Sergio965
Account Closed
- Impact
- 17
Hi,
As you all know, designing for compatiblity with multiple browsers can be a pain in the neck, and most of the time will lead to having two or more stylesheets, depending on the browser.
My question is: What is a W3C valid method for making this happen? I've been able to use two stylesheets, one for any browsers, and the other for IE6, but, I haven't been able to make the code valid with the W3C validator. This is the code I tried:
And the errors I receive from the validator:
Any help would really be apreciated.
Thanks in advanced,
Sergio965
As you all know, designing for compatiblity with multiple browsers can be a pain in the neck, and most of the time will lead to having two or more stylesheets, depending on the browser.
My question is: What is a W3C valid method for making this happen? I've been able to use two stylesheets, one for any browsers, and the other for IE6, but, I haven't been able to make the code valid with the W3C validator. This is the code I tried:
Code:
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="iespecific.css" />
<![endif]-->
<![if !(IE 6)]>
<link rel="stylesheet" type="text/css" href="not-ie.css" />
<![endif]>
And the errors I receive from the validator:
Code:
Line 10, Column 3: "if" is not a reserved name.
<![if !(IE 6)]>
Line 10, Column 6: character data is not allowed here.
<![if !(IE 6)]>
Line 12, Column 3: "endif" is not a reserved name.
<![endif]>
Line 10, Column 1: XML Parsing Error: StartTag: invalid element name.
<![if !(IE 6)]>
Line 12, Column 1: XML Parsing Error: StartTag: invalid element name.
<![endif]>
Any help would really be apreciated.
Thanks in advanced,
Sergio965






