Home

The IE7 Myth

Aug 22, 2006

A while ago, we got contacted at Drupal.org by the Internet Explorer 7 compatibility team about layout issues in IE7 on our site. The e-mail was intended to help web developers prepare for IE7 by pointing out problems. My guess was that Microsoft had used a web crawler to look for various CSS signposts (with human verification afterwards):

"The page www.drupal.org does not display properly in IE 7 due to specific CSS Hacks that we have deprecated in IE 7. We believe that this issue is likely caused by the use of the Underscore, html>body and Star HTML Hacks on your CSS file which has been removed from IE 7. In IE 6, the layout appears correct since the specific hack being used is supported in that version of IE.
...
Removal of these hacks will resolve this issue."

I got really annoyed by that last line because it's plain untrue. What's worse is that I've noticed similar comments made by others in the Drupal community (and elsewhere): "[Some site] is broken in IE7 because they use IE6 hacks". As the person who designed the Drupal.org theme, I want to clear this up because it's a big fat lie and it's easy to see why.

Any sane designer these days will design for the standards-compliant browsers like Firefox and then sprinkle on CSS hacks to make it work in IE6. The very nature of these hacks is that they are invalid CSS, which only IE6 considers valid (e.g. a { _display: none; }). Standards-compliant browsers ignore invalid CSS rules (as specified in the specs), so the hacks have no effect on them.

Because IE7 fixed the parsing bugs, it can now be considered one of those standards-compliant browsers (for parsing CSS anyway). This means that whether IE6 hacks are present or not will have no effect whatsoever on how the site looks in IE7.

So, whether intentional or not, Microsoft has been flat out lying. And by doing so they're shifting the blame for their screw-ups to the same designers they've been torturing for years.

Well, I'm tired of taking the blame: my design works fine in those programs that are worthy of the name browser.

Well said, I agree

Aug 22, 2006 ted

Well said, I agree completely.

Any sane designer these days

Aug 22, 2006 Sym

Any sane designer these days will design for the standards-compliant browsers like Firefox and then sprinkle on CSS hacks to make it work in IE6.

I think that any "sane" designer would use conditional comments to hack the browser they need and therefore remove the need to worry about the "problem" of updating hacks.

:-)

Well said!

Aug 22, 2006 Nicholas Thompson

I couldn't have said it better myself. I've always though the name Internet Explorer is ironic as, in its nature, an explorer is someone venturing into the unknown to learn new territory. I'd like to think by now Microsoft know what the terrain was like in terms of HTML, CSS, etc... but no - they still blindly wander around.

sane designers

Aug 22, 2006 jadwigo

As a [hopefully] sane CSS/HTML monkey I don't like to make a separate stylesheet that I have to include in the site with conditional comments when all I need is a small hack with two tiny underscores in my CSS...

So I really agree with Steven here - if MSIE7 behaves well it will not be bothered by those hacks and just render the expected standards compliant styles like opera, safari and firefox do (and usually those 3 render my sites identically)

You GO girl!

Aug 22, 2006 HornCologne

Microsoft passing the buck? Not accepting blame? I have NEVER heard of such a thing!

Fair enough

Aug 22, 2006 Sym

I do see where he's coming from, but MS do advise that designers use conditional comments, and hacks are, well, hacks. I think MS sending an email to people who use hacks warning them that sites might break if you use an un-supported way of getting sites to work is actually quite good.

I'm not trying to put an other designers down, but I do think that using condition comments is
a) the cleanest way of doing things
b) the best way to change sites (you can have two different sheets and just *know* that you'll not have to faf about with making 1 sheet work for IE and everything else.

I can see how just 1 or 2 hacks wouldn't matter, but at the same time, a conditional comment doesn't really matter....

Remove hacks? No way!

Aug 22, 2006 Jeremy Epstein

Why is Microsoft sending out emails like this? It's absolutely crazy that Microsoft is encouraging people to remove their IE6 CSS hacks!

Firstly, as Steven said, IE7 should ignore the IE6-specific CSS completely, just as do other standards-compliant browsers. So leaving the hacks in place should not make a site's CSS incompatible with IE7.

And secondly, does Microsoft really think that everyone is going to switch to IE7 the minute that it's released? If so, then I don't know what they're on (clearly something strong - LSD perhaps?). A significant proportion of people will still be using IE6 for a long, long time. Is Microsoft encouraging us to break our CSS layouts for all those many users who delay the move from IE6 to IE7?

Obviously, web designers will need to make their sites compatible with both IE6 and with IE7 for the next few years. Advising us to do otherwise would be very bad advice, IMHO.

by ommission perhaps

Aug 22, 2006 Suzy

lying by ommision perhaps?

if the whole truth were be told it depends on why you were using the hacks in the first place. If you were hacking in a width/height because of IE's hasLayout problems, some of them still exist and you might still need some sort of workaround for IE7 (enter conditional comments), if you were hacking in a width to get around the Box Model issues then it shouldn't make any difference to IE7 and you can leave the hack

What's the problem with seperating the sheets (CC's), at least eventually (when we're old and grey perhaps) we get to lose the extra sheet and when building templates it's a whole lot easier to provide the "what should be" along with a oh btw you need this too - it just sort of clarifies to absolutely everyone that IE still needs workarounds rather than sprinkling the hacks liberally throughout the CSS where someone will undoubtedly come across them later and not recognise them for what they are/were.

There are still newcomers to CSS using the Tantek Voice family hack without knowing why or that it is irrelevant today, if it was put in a CC which it could have been and notated what it was for then perhaps it would be different..

I think perhaps their method was perhaps not the best way, but at least the drama of it brought attention to it and hopefully made template designers take a further look

Or just use a css preprocessor

Aug 22, 2006 DrSlump

As someone else pointed out a hack is just a hack, so you can't blame a new browser if it's not compatible.

While I agree that if all browsers implemented the standard completely, as you said, the unrecognized tokens wouldn't be processed. However, using them is still a hack in the sense that they are not part of the standard.

In my opinion a better approach which works quite well is to use a preprocessor for the CSS files. Using PHP for example you can keep your stylesheet together and produce different files for each browser. Moreover it also comes in handy to define color constants, simple maths for widths/paddings, etc.

By using IE's conditional comments you can filter out IE from the rest without the need for JavaScript. If your site requires JavaScript (like web apps) you can even produce customized files for things like browser and version, window dimensions, url ...

Conditional includes vs hacks doesn't matter

Aug 22, 2006 Steven

Hold on guys... okay, so yes, it is cleaner to use conditional comments rather than CSS hacks. But that doesn't change anything: if you had a conditional stylesheet for IE6, IE7 would still be broken. My beef is not with the method used to include the CSS, but the fact that Microsoft is hiding behind this non-issue to divert attention away from its broken rendering engine.

I'd also like to emphasise that unofficial CSS is actually more acceptable than e.g. unofficial HTML, as the CSS specifications explicitly say how parsers should deal with rules they don't understand.

But in the end, either method is not part of the specs and you need to update your CSS regardless because IE7 fixes a bunch of problems, but doesn't fix enough. Designers are just stuck with a different set of problems to work around.

Personally, I prefer using the CSS hacks because it lets you put the IE-workaround right next to the standards-compliant version. It also means you're less likely to forget to change something in one, but not the other.

Disclaimer: last month a

Aug 22, 2006 álvaro

Disclaimer: last month a page I was doing started to crash in IE for no apparent reason. A combination of standard XHTML+CSS made IE crash. I had to substitute some DIVs with tables to fix the problem...

I understand your claim but I think this time MS is doing the right thing (well, more or less). I had the pleasure to attend Chris Wilson's (the IE product manager) talk at London's @media last june. It was great to put a face beside all my lost hours of work debugging IE.

Chris' talk made me understand that they are not a bunch of lazy developers who don't care about anything (or as I thought for a long time, that there was nobody working for IE) but that they face difficult and complex problems and furthermore inside a big corporation (those of you working for one knows about how many time is needed for every little step).

They are aware of their bugs and they care about the problems that may arise when they are fixed. And that's the reason of their mail. Although for sure "Removal of these hacks will resolve this issue" is not the best you can tell to someone who has been suffering working around their bugs...

Anyway, you may use conditional comments that targets IE lower than 7:

<!--[if lt ie 7]>
...
<![endif]-->

cheers,
álvaro

I'm not sure what all the

Aug 22, 2006 BryanSD

I'm not sure what all the controversy is about the use of conditional comments. Perhaps personal opinions about Microsoft are clouding our long term memory? Microsoft is asking of web designers to do nothing more than what was needed to be done in the "big" migration from Netscape 4.7 to Netscape 6.x.

Hacks back then that you placed in your pages so they can be viewed correctly in Netscape 4.7 didn't look so well in Netscape 6.x or 7.x. So everyone put conditional comments so that Netscape 4.7 only saw the hacks for Netscape 4.7. I can't tell you how much time I spent in my own organization convincing people that the problem was with the coding in their Web pages and not the more compliant Netscape 7.x or Firefox 1.x!

By the way, some of the same problems I've seen with drupal.org in IE7 Beta I have also seen with Opera. So perhaps addressing some of the IE7 concerns may fix some of the issues with Opera too? Then again, maybe it won't..

-Bryan
.

Correction

Aug 22, 2006 BryanSD

Sigh...talk about memory loss. I didn't mean to say Firefox 1.0 but instead say Mozilla. By the way, I'm not overstating how the IE6 to IE7 discussions are similar to the Netscape 4.x to later versions. Check out this old link on how others reacted to the Netscape 4.7 to Netscape 6 changes:

http://www.oreilly.com/pub/a/oreilly/news/petition_1100.html?page=1

Now Netscape 6 was really beta even when it was finally released as "official". However, that was good news as it gave us a chance to review the latest updates through Mozilla. By the time Netscape 7 rolled out...I had everyone on Mozilla and they didn't want to go back to a non-opensource browser. :-)

I'm not fooled

Aug 23, 2006 Sym

@álvaro

Sorry but I just don't buy the argument that the IE team are working hard on standards at all. They have had about 5 years since IE6 and in that time we are told the IE team have been working on getting IE7 up to standard. Why then were most of the standards changes added in beta 3?

in terms of stating that we really do fully support the CSS 2.1 spec, it's hard to tell because there is a bias to any analysis. We're certainly somewhere between those two… I don't think we're at 90%, I think we're above 50% though - and again, it really depends on how you end up weighing things. The problem is, if I gave any number I'd really want to support how I came up with that number - and I don't have a great way to do that today.

http://blogs.zdnet.com/web2explorer/?p=260

So they are not sure?

They have had a long time and a lot of money. If you include all the old IE's then they have had about 12 years working on this thing. Ok so a lot of the standards wern't about 12 years ago, but thats what they are getting paid to do isn't it? You would have thought that it would be the best browser in the world.

Sorry, I just don't buy it at all.

C'mon

Aug 23, 2006 Kevin Cannon

Seriously, this needs to be put into perspective.

Microsoft is seriously improving the standards compliance of their browser. So much so, that they're some sites may actually break in it.

Not, you can nitpick at wording issues, but the improvments are laudable and the fact that they're being proactive is letting people know there may be issues with their sites in IE7 is a good thing.

no, no no, No , No , NO, NO!!

Aug 23, 2006 Michael

CSS has been a standard for a long time (in internet time). Other browsers have been built from the ground up in the CSS era. Microsoft has no more room for excuses. At one point IE was the standard, and Microsoft liked it that way. Microsoft needs to fess up and realize that it is no longer the standard, we are not going to break our web sites just to make them work in IE. IE7 will force developers to recode entire sites well I am not rewriting my stuff I say NO screw IE. When my clients call complaining that they cant see my sites in IE, I will say IE has too many bugs use firefox.

No one gets it

Aug 23, 2006 Anonymous

It seems to me that no one here really gets what this post is about. This post is not about _hack vs. conditional comments. This post is about MS sending FUD to web developers.

The _hack will not cause any issues in IE7. I have been using IE7 betas to test a site I just recently finished, and I know what MS is saying is complete bunk. I use the _hack for a few elements, and it is completely ignored by IE7. MS is crying wolf when there isn't one for miles.

Great post. Ignore the people who can't read.

Conditional Comments/IE7 uptake

Aug 23, 2006 Phil Nash

Come on... conditional comments are the only safe way to push ahead with design. The IE7 uptake will be large because it will be pushed out with automatic updates. I estimate about half of all IE6 users will change immediately because their computer tells them it's an important security update. This means that if your site does break in IE7 then it will lose or confuse plenty of users, not a great prospect.

On top of that, conditional comments allow incredible versatility for targetting offending IE versions, as well as keeping your css free from confusing, hacky code. It's a win win stituation.

If your hacks won't work in IE7 and (as we expect) certain bugs and lack of standards support means this will break your site then you will need to fix it for those who know no other browser than IE.

Ps... conditional comments could of course be used in other ways to adjusting CSS problems: you could always display a message to all IE users telling them how wonderful firefox/opera is, hoping they will make a change for the better!

Totally Agree

Aug 23, 2006 Vinko Tsui

I totally agree with Steve in terms of M$ placing blame on the developers.

Sending out emails like these to developers/companies are just trying to support their own agenda of forcing everyone to switch out of IE 6 or earlier.

M$ is hoping that the switch, due to habit, will be IE 7, but as Steven had said, these "CSS hacks" should not affect IE 7 if it [IE7] was fixed correctly and fully compliant to the CSS standards.

Therefore, the fact that these pages are not displaying correctly in IE means that M$ may have corrected the CSS compliance issue, but they have missed out on the rest of the W3C standards for a browser.

So, my suggestion and wish is for all developers to do nothing to explicitly support IE 7, but rather continue to code to the W3C standards. So that more sites will break for the end-user, unless they are using one of the fully Standards compliant browser.

I personally think that M$ had been spoiled for too long. What I mean is that they had been the dominate player by default; end-users do not bother or care to install any other browser except the one that came with the computer they purchased or what was already installed with their OS. As a result of this unjustified dominance, M$ had slacked off and not correct issues/bugs that they should had fixed much quicker.

Therefore, if majority of the end-users cannot use majority of the Standards compliant web sites on the Internet, and these web sites clearly states the list of Standards compliant browsers that will work properly. M$ will be forced to finally stick to the Standards rather than forcing their own onto developers.

See the big picture

Aug 23, 2006 student

Say you work at Micrsoft on IE7. Vista RC is breathing down your neck. You want to close out bugs in a hurry. Never mind that Vista is supposed to be a quality driven release, it's becoming pretty clear that Microsoft does not want to slip the ship date again, which means it's really a date driven release. If Vista and IE7 aren't "quite ready" to make the promised dates, expect to see more of this weaseling.

appauled

Aug 23, 2006 beingdevious

i am simply appauled.
i will not accept blame for the fallacies of IE6. i, as a designer, have spent too many hours(just like many others), just tyring to make sure it works in IE.

and you are so right, if it becomes a standards "supporting" browser, then the hacks wont matter.

also, if we remove the hacks, the majority of our audience is still using IE6.

i think not.

well written!

Michael: I guess you already

Aug 23, 2006 Anonymous

Michael: I guess you already know you will lose A LOT of customers with that attitude and lazy excuses.

Phil Nash: I totally agree. Use the really useful and safe CC's and stop fiddling around with underscores and html>body crap.

Your site looks great in

Aug 23, 2006 Martin

Your site looks great in Safari :D

strange that lol

driving users?

Aug 23, 2006 Jonathan Barrett

I'm wondering if this is a ploy to get developers to help hike uptake of IE7. By convincing developers that the should remove IE6 hacks, hence breaking their site in IE6, is MS hoping to encourage users to move to IE7 in bigger, faster numbers?

I'm just saying, is all.

Agreed

Aug 23, 2006 web design uk

Well said!!

Microsoft takes the piss

So True!

Aug 23, 2006 Daniel

You made a very simple argument yet it is so true! You pointed out the obvious and I really don't know what Microsoft would say back to this comment -- they probably wouldn't even respond! Great post.

I'm not a designer...

Aug 23, 2006 ciphun

...by any means. I like to believe that I have a good understanding of what looks good and doesn't; but I have no formal knowledge/skill presently to put my ideas into play. (I have a website built through iweb; and that's all)

However, I just wanted to say: Good job on sticking it back in their faces.

I personally can't stand it when people/companies try to push their weight around. It's unnecessary; I don't stand for it and I am glad you didn't either.

cheers!

Can we all get together and

Aug 23, 2006 Anonymous

Can we all get together and do a class-action "cease and desist" order to Microsoft from releasing a non-compliant browser that is going to cost all the companies tons of money on making sites compatible, and cost designers tons of headache to find and apply hacks!

I hate microsoft more than ever. The buggers never learn!

Well said!

Aug 23, 2006 nxt

What MS did was basically replace CSS hacks derived from parsing inconsistencies with new MS-standardized hacks. That's a bit strange - why MS has these conditional hacks while claiming their CSS engine is standards compliant - Gecko or Preston are standards compliant and they seem to work fine wihout hacks. It's a MS browser so I guess MS can do whatever they want with it, but spaming people that their CSS was "hacked" to work properly in IE6 is a bit absurd. Instead of sending a thank-you letter for tweaking it they rather treat them as idiots: "Hey! Fix it!"

I've been running IE7 for testing purposes for half a year and I must admit there are improvements towards the standards, on the other hand it's incredibly slow. The only thing I am REALLY horrified about, is that MS might enforce IE7 on users with their genuine disadvantage update tool. On one hand it would get rid of most IE6 users, on the other hand it would also get rid of quite a few web applications. ;(

Maybe they should take the Vista approach and play with it another few years and get it done finally right.

I can't agree with you more!

Aug 23, 2006 Jon Issler

You were just able to say in a couple lines what I have been trying to explain for years. THANK YOU!

RIGHT ON

Aug 23, 2006 kylemoseby

Couldn't have said it better! Good call.

Driving change

Aug 23, 2006 javamate

This may be a bit off the wall, and I'm not fully convinced it would work in my own mind, but I'm curious what others think.

We know that IE has the lion's share of the browser market (though we all mourn it for the reasons discussed above and others besides). And this is probably the only reason we try to make our sites work in IE. If the tables were turned and IE had only 15% or less of the market we likely wouldn't waste the countless hours and strands of hair that it takes to make a simple web site look the way it should in IE.

Corporations are largely forced to make their sites look good in IE due to its market dominance and their desire to ensure no one is prevented from seeing their site, buying their products/services, etc.

But the rest of us, especially those operating personal web sites, open source projects, hobby sites, etc. aren't necessarily driven by the same forces. So what if we revolt?

What if we just ignore IE altogether? We do as Steven described -- design our sites in a standards-compliant browser but then skip the part about hacking our own sites to bits just to make it look right in IE.

The risks?

  • Our site doesn't look quite right in IE
  • Our site doesn't show up at all in IE
  • We look like incompetent designers
  • We lose traffic/business

But the number of sites in the world that are personal/hobby/open source/etc. far outnumbers the number of corporate sites. And folks do a lot more web surfing in their personal time/life than they do visiting corporate sites.

So what am I getting at? If we revolted as I described, could we drive a change in the browser market enough to oust IE from its top position? By promoting other standards-compliant browsers on our sites (you can actually get money from Google for promoting Firefox), and ignoring IE could we actually affect a change in the browser market?

The goal would be to change the market enough that either IE is forced to become standards-compliant or that it becomes such a small player in the market that it's not worth wasting time hacking sites to make them work in it. The latter is unlikely given that most corporations run on Windows, but the former may very well be possible.

What do you think?

Why duplicate?

Aug 23, 2006 Alec

Wasn’t one of the points of CSS the ability to control many pages of a site with just one css file? In my opinion conditional comments or the _hack are both bad when talking about displaying pages on PC based web browsers. The _hack however keeps the whole of a sites style in one place where it should be.

Re: Why duplicate?

Aug 23, 2006 javamate

Alec, the point of CSS is not the ability to control CSS with just a single file. It's the ability to control the style of your site separate from your markup. Whether you use one CSS file or half a dozen is entirely up to you.

But none of this is the point of the original blog post. IE6 hacks don't break IE7 and MS says they do. They're bluffing and we're miffed.

I agree.

Aug 23, 2006 Eric Carroll

Although, it is great that they are making an effort, I have been a bit skeptical of how compliant IE7 would be, from the beginning.

Now I do not use hacks on in my CSS anymore (or haven't in very long time), but my problem all along with IE7 and the above-mentioned remark from Microsoft has been this:
If IE7 is truly compliant and has a better rendering engine why does it matter if I have hacks for an older version of their own browser? Shouldn't it be ignoring them?

I agree that Microsoft has been passing the buck here, but that is consistent with their past. We have to fix our code, but they won't fix theirs. I think Jonathan Barrett may have hit the nail on the head here in that they may simply be trying to make IE7 look better, but I belive that a good, solid product will sell itself (like Firefox and Apple).

As far as developers and designers are concerned, maybe there will be just enough of a backlash that they will lose more market share on IE6 and IE7 to Firefox and Apple (Safari).

It does make me wonder if they will cut more corners to meet their ship date on Vista, but who knows. What if Leopard comes out and Vista's ship date gets pushed back again? Could that be why Steve Jobs didn't show off a whole lot of Leopard?

That aside, I won't be encouraging any clients to use IE7, anymore than I would recommend IE5 (or 6).

it makes sense *if* ...

Aug 23, 2006 Matt Crawford

MS's actions make sense if IE7 parses better to avoid processing hack-hidden directives, yet does not fix the bugs which led designers to include those directives in the first place.

It sounds more like MS wants

Aug 23, 2006 Anonymous

It sounds more like MS wants you to remove the hacks so that the browser will look bad in IE6 to force users to upgrade to IE7.

Microsoft throwing blame, standards

Aug 23, 2006 evolver

I appluade you for your comments. I've spent time fighting IE hacks (by MS) for the standards and have seen MANY examples of incorrect behavior in IE 6. I gave up and stick to W3C. My advice to all web developers: Develop according to the W3C standards, and have something indicating this is a W3C complient site, and which browsers pass the test. We are all supposed to confirm to a common standard, and its NOT Microsoft. They did not invent the internet, they just try to control it. (so is Google but they don't make an OS or Web Browser). Stick to your standards (guns) and if MS doesn't handle it, so be it. For those of you who want to kiss up to MS, why not just make the site dependent on ActiveX/VBS, and see how much traffic you get in 3 years. If we stand firm, MS WILL get the message and make it a higher priority. ;-)

Agreed

Aug 23, 2006 InvisiBill

As stated, this is not a "CSS hack" vs. "conditional comments" debate. Conditional comments are probably the best way to deal with IE, but that's a solution for a single browser (which admittedly, most of the hacks apply to). I think it only goes back to IE5 as well, so it's only a subset of of that browser even. It also may require periodic updating to change your conditions to apply only to certain versions of IE as they add or remove features. CSS hacks are actually standard CSS in that CSS defines how to handle unrecognized code. The hacks utilize bugs in certain browsers, but the code itself is actually covered by the CSS specs.

The issue here, to repeat, is that if IE7 really does follow the CSS spec, then it should properly handle the hacks (by ignoring them) like the other browsers do. If they fixed IE7, then the hack won't affect it. If the hack does cause problems, they didn't really fix it completely.

The Microsfot IE blog just

Aug 23, 2006 Molly C

The Microsfot IE blog just posted an entry "Details on our CSS changes for IE7".

http://blogs.msdn.com/ie/archive/2006/08/22/712830.aspx

Sorry, it sounds like most

Aug 23, 2006 Brutus

Sorry, it sounds like most of you are too incompetent to do your jobs and update your sites. Why is anyone paying you if you refuse to do your jobs? Stop whining and do what developers do - work around any problems you encounter and produce results. The whining here is sickening.

I can't believe people are

Aug 23, 2006 David

I can't believe people are still handcrafting their pages for different browsers. This is insanity! (My experience of this kind of hacking behavior goes right back to Mosaic and Netscape 1. What do you mean, you don't remember them?)

The answer is simple. Use standard code that will work on any popular browser. If it doesn't work, rethink your design. And while you're about it, delete any JavaScript; it's the work of the devil.

Ever heard of the KISS principle?

A agree as well

Aug 23, 2006 Denis Hawkins

Microsoft has lost the plot for to long with its web browser not being fully compliant to web standards, you would think they would of worked it out by now.

How to prepare for Internet Explorer 7

Aug 23, 2006 Nicolas Mendoza

I'll tell ya how to prepare for IE7 -- Wait, I already did that a year ago:

http://my.opera.com/nicomen/blog/show.dml/16074

Hacks

Aug 23, 2006 Jesse Ezell

We do far more advanced CSS work than drupal.org, do it fine WITHOUT CSS hacks and have it render pretty much identically in IE 6, IE7, and Moz. I've never needed a hack to accomplish anything, so I have just about zero sympathy for people who are bitching like you and don't have anything worthy of bitching about.

Jesse Ezell: encountering IE bugs

Aug 23, 2006 Steven

Try these:

  • Shrink-wrap floats (float + width auto) inside a 'position: absolute' element with percentage widths.
  • Nested 'position: relative' divs up to 5 levels deep without triggering a single 'peekaboo bug'.
  • Padding on nested inline elements.

These are just a couple of bugs I remember I encountered, and there are plenty more. They required IE hacks to fix. The big problem on Drupal.org is that we do not have strict control over the content posted, as it is a giant community of submitters. The site layout needs to accomodate tons of varied content (tables, clears, floats, code boxes, forms, columns, images, ...). Doing all this without ever encountering an IE bug is extremely unlikely.

Plus, that doesn't mention any of the behavioural differences in page behaviour, like IE handling multiple form buttons or <button> tags differently.

I'm not saying a good CSS-based design that works in IE is impossible. However, even a single browser bug often takes up a ridiculous amount of time to fix and definitely drives up the time and money needed for good web design. I sure encountered several.

I can't see anything broken

Aug 23, 2006 poni

I can't see anything broken in ie7 here, though.

Jesse Ezell - css hacks

Aug 24, 2006 nxt

Yeah. Designing two column page is real CSS-advanced design. Maybe You should try to design something that goes beyond the simpliest web page in the world and than start accusing people of bitching. Your twisted logic can be applied to document design saying - "I can write anything in notepad and anyone using Word or DTP is incapable idiot."

Moreover - this is not about CSS hacks, but about the approach MS decided to choose to approach people, who were desperately trying to fix inconsistencies in IE standards interpretation. And from their approach I get the impression, that the only one bitching here is MS about hacks, people used trying to do their best to fix non-standard behaviour in IE. (and of course, You are bitching a little about criticism You do not agree with....;-) )

Why anyone seems missing the point?

Aug 24, 2006 Folletto Malefico

(1) The issue isn't hacks or non-hacks. The issue here is M$ that says "hey, your site is badly designed".

(2) The CSS Star Hack is 100% CSS Compliant. So, that isn't an hack in any way. Just due to the fact that IE6- reads it, it has been used and I think that is the only "hack" that should be used in CSS. No "_" before declarations or "/**/" stuffs.
I repeat: the CSS Star Hack is 100% CSS Compliant AND it matches just IE6-

(3) Conditional comments are, in my view, a Microsoft nonstandard extension to HTML.

  1. First: it should be in CSS and not in HTML
  2. Second: it's a Microsoft-only extension
  3. Third: it's a "comment" (duh) so it's semantically wrong

(4) And maybe the most important point: the hacks are what started the CSS revolution. Without them, a huge majority of designs were unable to exist. So, it's in my opinion plain silly blaming them: they ARE needed. Every browser treats the standars in its way (i.e. Safari fonts vertical misalignment?) so a way to select them IS needed. And I'd like something like:
@import "ie6.css" on /MSIE 5\../i

(5) If IE7 has removed all the hacks and is at least as standards compliant as Firefox/Safari/Opera, so everything should work exactly as Firefox/Safari/Opera vs IE5/6, since the hacks are skipped and the CSS engine is standard compliant. So, IE7 introduction and fixes SHOULD BE 100% PAINLESS, if it has been developed as a CSS2.1 standard compliant browser. And that's all.

The point (5) is what this article is about. IE7 is CSS2.1 compliant? Good, so my CSS with IE5/6 hacks should be read correctly, as in Firefox. Dot.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul> <img> <em> <p> <br> <span> <div> <h2> <h3> <abbr> <small> <table> <tr> <td> <strong> <acronym> <th> <blockquote>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

Recent comments

Images