Reinspire

You are viewing an archived page from the 1st version of my site, but I've started over. You can find the latest content and design at www.reinspire.net, or read all about the relaunch here.

IE Conditional Comment Update

Well, with Internet Explorer 7 now released to the public, I thought I’d post a short update to a post I wrote back in May about Serving Up IE Specific Stylesheets.

IE 7 is better than IE 6 as it should be; it only took Microsoft 5 years between releases and a lot of things have changed since then. From a developer’s standpoint though, IE 7 is significantly better with its CSS support. Transparent PNGs are in, dotted 1 pixel borders are actually dotted (as opposed to dashed), the “double-float margin bug” is history, the :hover pseudo-class is supported across the board, etc. etc. etc.

There are a few little bugs remaining from the IE 6 days and I’m sure there are going to be several new ones that surface as people get more and more familiar with IE 7. If you’re familiar with conditional comments than you’ll most likely know that the best way to get around the specific layout problems that IE presents is to avoid using browser specific hacks in your CSS and to serve those offending browsers their own stylesheets instead.

So, IE 7 is now going to require a separate set of rules to fix things, and I thought I’d post the code to serve up a stylesheet for specifically IE 7. Here’s the code:

<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="YOUR_IE_7_STYLESHEET.css" />
<![endif]-->

So there you have it! I’ve cross-posted this update on the original article as well, so if you’d like a little more context you’ll want to give it a read. Unfortunately IE 6 will still be around for quite some time, so we’re still going to have to support that browser for years to come. Here’s to hoping that Microsoft is a little more prompt with their updates to IE in the future.

Also, if you’d like to see some IE 7 conditional comments in action, just view the source of this page!

Posted in: Code, CSS, CSS Tips, Web Development, Web Standards

Comments

Globally Recognized Avatar1. Chris Iwanowski - October 24, 2006, 9:10 AM

Seems it’s “new browser month”

Globally Recognized Avatar2. Jonathan Eckmier - October 24, 2006, 8:13 PM

Yep, Firefox 2 has now officially been released as well.

« October 2006 »

Sun Mon Tue Wed Thu Fri Sat
1234567
891011121314
15161718192021
22232425262728
293031    

Search this site

Latest Entries

Hot Topics