glog
the greydient weblog

Css IE 6+7 and Firefox hacks
Thursday December 07th 2006, 9:26
Filed under: Web Design

I read some posts, and found the best way to make a compatible css-file for both IE 6+7 and Firefox.Safari and Firefox on OSX reacts (almost) similar to Firefox on Windows.

It’s quite simple, and I’ve corrected IE 6 optimized sites in a matter of minutes.

This is the trick:

margin: 10px;
.margin: 10px; /* read by both IE 6 and 7 */
_margin: 10px; /* read by IE 6 only */

That’s basically it.

NOTE: Not W3C compliant stylesheet, but it will look great :)

1 Comment so far
Leave a comment

You might consider splitting your .css files if you want W3C compliant styling.

Comment by mortenn 03.08.07 @ 13:59



Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(required)

(required)


*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word