Project83 { Websites that Smile! }

May 18th, 2006

Internet Explorer Stylesheets

Anyone that has built a website with web standards understands the incredible feeling of finishing a layout with validating XHTML and CSS. That unbelievable feeling of bliss and confidence comes to an abrupt halt when you actually look at your layout in Internet Explorer.

While it is the world’s worst browser, web developers must make their layouts functional in IE because the majority of internet browsers still use it. So in order to make it work, the really smart people created hacks. They all work great for now, but with the new release of Internet Explorer 7 on the horizon, we are called to rethink all of our hacking.

This new version invalidates some of the most popular hacks created to help developers display their layouts on IE, so we are stuck. Luckily, there is indeed a solution: put all of your IE hacks in a separate stylesheet!

That’s right, just create a stylesheet with all of your IE hacks and include it in your layout like so . . .

<!--[if IE]>
<link rel="stylesheet" xhref="ie.css" mce_href="ie.css"></link> <![endif]-->

Keeping your hacks in a separate file will solve your problems and ensure correct layouts on versions of IE old and new. But hey, why bother with IE for your personal browsing? Just download firefox, better yet buy a MAC!

For more information on this subject, visit Position is Everything.

Posted in Web Development -

One Comment

JaredMay 18th, 2006

A very helpful blog entry!!!

I LOVE READING YOUR BLOG.

Reply to this Post


  • * Not published