IE Conditional Statements in XSLT
Comments 0Wednesday, July 09, 2008 | Permalink
This is a simple bit of code that allows IE conditional Statements to be passed in XSLT. I had some difficultly getting it to work, and even followed a tutorial, but to no avail. The code I used is…
<link rel="stylesheet" type="text/css" media="screen" href="css/styles.css"/>
<xsl:comment>[if IE 6]>
<link rel="stylesheet" type="text/css" media="screen" href="http://www.yoursite.com/css/ie6.css" />
<![endif]
</xsl:comment>
So this will need to go in your <head> tag. The top line of the code is your original and main sheet that will be used by good quality browsers. The following messy looking code is the sheet being placed in an XSL comment, and because of this escape characters are needed for the tags. This sheet will over ride the first one if the browser being used is IE 6. Also you will need to link to your sheet directly in the comment.
Hope it works for you too!
Latest
Work
News
Inspiration July 30, 08
Check this…
Life July 30, 08
Justin and Jeremy are currently in a ‘worst-bloke-off’.
Sport July 03, 08
Matthew Richardson, $5 for the Brownlow, $115 for me.