views:

1069

answers:

9

Hello, I just finished slicing and coding a very nice table-less css template for my website, all the time I was testing with IE7 and Chrome.

Then I just had the brilliant idea of testing this template with IE6, I installed Windows XP on a Virtual PC and then I opened my website on IE6.

It looks extremely bad!

The format of my page looked like garbage, nothing displaying correctly like in IE7 and Chrome. I knew that some things were not supported by IE6, but I didn't think that my page would render like it did.

So I would like to know if there is a place where I can see what is not supported by IE6 so I can fix my CSS or even create a new one only for IE6.

Any info will be very helpful!

Thanks!

+3  A: 

Some examples are:

  • Child selectors: a>b {}
  • Adjacent selectors: a + b {}
  • Attribute selectors: [id="my_id"] {}

For an impressive example of use of incompatibilities, take a look at Gemination at CSS zen garden design with IE6 and Firefox.

Moreover, you can navigate through A list apart site for resources on the subject (and many others about Web design).

mouviciel
+15  A: 

IE6 has LOTS of CSS bugs so that will be contributing to your page rendering. The official list of what is and isn't supported is here.

What might also help you is positioniseverything.net, they have a comprehensive list of IE bugs and their fixes.

If you're still struggling to get it right post a link to your page.

sanchothefat
+1 for positioniseverything
annakata
I forgot to mention CSS-Discuss aswell. That mailing list taught me nearly everything I know.
sanchothefat
+1 the official list is a good checklist. btw, Microsoft hates you.
DMin
+6  A: 

I strongly strongly recommend you to view this site http://quirksmode.org/dom/compatibility.html: it has a great compilation and test cases for most stuff, css and javascript.

Miguel Ping
+1 beat me to it :)
annakata
I would disagree. Quirks will only cause you pain in the long run. Keep in mind that quirks/standards mode also affects JavaScript in IE too.
scunliffe
Sorry, maybe I wasn't clear. Quirksmode is a link in this site. I'll edit the post, tks
Miguel Ping
Page has moved to : http://quirksmode.org/compatibility.html
DMin
+2  A: 

the ones that I stumbled across the most :

- li:hover (or on any element except a)
- min/max-width
- min/max-height
andyk
+2  A: 

Firstly I'd advise you use Eric Meyer's Reset Styles which will ensure as much correctness as possible for cross-browser support. Secondly, I'd revise Yadyn's post about "Knowing Thy Enemy". Whilst it can be a nightmare it has to be done as statistics will show that even though IE6 is no longer actively developed and has been taken over by IE7, it's still widely used.

Kezzer
+5  A: 

I would imagine you have Firefox installed on your machine. If so install the Firebug add-on (which is fantastic in itself) but if you also install the new add-on from Sitepoint, FireScope, it will allow you to right click your elements within Firebug and pull-up a browser compatibility chart for your CSS and HTML (plus extra code samples)

With Firebug you can also edit your CSS and watch the resulting effect in real-time, which can save alot of time!

Once you have identified the areas of the site that are breaking use the following approach to use an IE6 specific stylesheet to correct them so that your design stays working as you intended for more modern browsers

<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="/Css/IE6.css" media="all" />
<![endif]-->

As an extra tip opacity and PNG's or GIF's with transparent backgrounds don't tend to play nicely in IE6 and I would strongly recommend you use a JavaScript library such as Prototype or JQuery if you are working with JavaScript

Nick Allen - Tungle139
This approach doesn't scale that well, because next thing you know you'll be adding another css for ie8 because it has neat blur effects, etc...
Miguel Ping
I guess so if you start using proprietary browser filters but there is plenty you can do with designs without using those. I would only suggest using conditional style sheets for critical fixes i.e. stuff that makes a site unusable in older browsers, not for stuff that would make a site extra pretty
Nick Allen - Tungle139
A: 

If you look on the W3Schoolswebsite it tells you what Properties are support in which browsers. Hope you find this useful.

Cool Hand Luke UK

Cool Hand Luke UK
A: 

Something that never works for me is the visibility attribute. And it's darned annoying as well (no it is not the same as display!)

Ross
perhaps because you should be spelling it as a 'visibility' property? This is one of the oldest and best-supported CSS properties there is - even going back to Netscape 4 and IE3...
bobince
Correted. When I've tried it it's worked in Firefox, IE7 etc. but not for IE6. Might just be me then...
Ross
+1  A: 

In addition to the things mentioned, make sure you use a doctype that makes IE6+ use Standards Mode. The bugs and hacks are just about manageable in Standards Mode without having to have a completely different stylesheet.

Otherwise IE6 will revert to Quirks Mode and you are essentially having to support IE5, with all the box-model-hack horribleness that entails.

bobince
I'm using "XHTML 1.0 Strict", is it ok?
Bruno
Yep! You can check it's picked up by entering "javascript:alert(document.compatMode)" in the address bar. You want it to say "CSS1Compat".
bobince