Skip to main content

learn advanced html :Conditional Comments

Older versions of Internet Explorer are frequently either inept or naughty. Or both. But they are still popular so we don’t want to ignore them.
Conditional comments, which are nothing more than simple HTML comments that IE (up to version 9) happens to take a peep at, are used to throw a chunk of HTML at these browsers and only these browsers. Other well behaved, top-of-the-class browsers will simply see them as unremarkable comments and move along.



They have become a commonly used method of latching extra CSS to a document to plaster over holes in these browsers’ display capabilities. So, for example, you might add something like this inside your head element:

<link href="everything.css" rel="stylesheet">
<!--[if IE]><link href="stupidie.css" rel="stylesheet"><![endif]-->
Everything between <!--[if IE]> and <![endif]--> will be picked up by Internet Explorer. So this will bolt on a CSS file as normal, and then, only if the browser is Internet Explorer (in practice, this will be Internet Explorer version 9 and below), it will also apply an extra CSS file patch.
You can also target specific versions of Internet Explorer:
  • <!--[if IE 6>
  • <!--[if IE 7>
  • <!--[if IE 8>
  • <!--[if IE 9>
You can also target all versions that are greater or less than a certain number:
  • eg. <!--[if IE gt 6]>… for IE versionsgreater than 6
  • eg. <!--[if IE gte 8]>… for IE versionsgreater than or equal to than 8
  • eg. <!--[if IE lt 7]>… for IE versions less than 7
  • eg. <!--[if IE lte 7]>… for IE versions less than or equal to 7
There are actually more options than this which are largely totally unnecessary. Take a look atMicrosoft’s own take on it if you really feel compelled to find out more.


Popular posts from this blog

Free tips to save yourself from phishing

Free tips to save yourself from phishing Phishing is a type of social building method utilized by programmers to assemble delicate data, for example, usernames, passwords and Visa points of interest by acting like a trustworty individual/association. Since most online clients are ignorant of the methods utilized as a part of completing a phishing assault, they regularly fall exploited people

html intermediate tutorial Text: Addresses, Definitions, Bi-directional, and Editorial

Addresses address  should be used specifically for the contact details  relating either to the entire web page (and so only used once) or to an  article element . It’s isn’t, as it might at first appear, for marking up any old address willy-nilly. < h3 > Author contact details </ h3 > < address > < ul > < li > 0123-456-7890 </ li > < li > author_dude@noplaceinteresting.com </ li > < li > http://www.noplaceinteresting.com/contactme/ </ li > </ ul > </ address > Definition terms dfn  is a  definition  term and is used to highlight the first use of a term. Like  abbr , the  title attribute can be used to describe the term. < p > Bob's < dfn title = "Dog" > canine </ dfn > mother and < dfn title = "Horse" > equine </ dfn > father sat him down and carefully explained that he was an < dfn title = "A mutation that comb...