Forum Moderators: not2easy
I'm fairly new to total CSS and its getting quite annoying! things like border-spacing:2px and other such commands are adheared to by firefox&opera and ignored by IE.
Is it errors in my code or IE that's to blame?
grrr ;-)
hughie
Remember back in the day, when people would use javascript sniffers to determine what browser the end-user was using, and serve up the stylesheet for that particular browser? Conditional comments are something like that - except no javascript. See, the thing is, most browsers out there are standards-compliant. So if you code a site for, say Firefox, it'll pretty much look fine in Netscape, Konqueror, Safari, Opera and stuff - because they are all compliant browsers. You *may* have to fudge a few things every now and again, but for the most part, you're okay. IE, however, is in it's own little world. Using a conditional comment simply tells IE to "render the regular stylsheet, and hey, here's some stuff to append that for your sorry ass."
You can see a great article on conditional comments and how to use them at Position Is Everything [positioniseverything.net]. (this link also show your how to use IE standalones to test in multiple versions of IE - scroll down a bit to see the conditional comments stuff.) But you can easily create a stylesheet for compliant browsers, and then create a separate, "appendage" stylesheet for IE...no need to completely rewrite the stylesheet - just target those specifics that need fudging for IE, and you're set.