Custom CSS For IE
May 12th, 2006
I have tried my best to avoid needing to have a custom IE css file. This has involved many painful hours over the past few years of finding creative ways to write my HTML and CSS in just the right way to ensure that every browser is happy.
However, I have finally thrown in the towel on one particular annoyance I am having where my tabs are 1-2 pixels off in IE on a new layout I am working on for the GiftHat.
Thankfully, a post on the IE blog pointed me towards a method that doesn’t involve hacking the CSS in ways that are guaranteed to break in future IE versions. You can just add a simple line into your HTML file like so:
<!--[if IE]>
<link href="ie-fix.css" media="all" rel="Stylesheet" type="text/css" />
<![endif]-->
Then only IE will include this CSS file.
For futher reading, I also found this great article on the subject:
http://www.positioniseverything.net/articles/ie7-dehacker.html
Subscribe to the feed!
Leave a Reply