[thelist] Ugh! Mac/IE

Michael Barrett mbarrett at abouthalf.com
Fri Mar 7 15:38:01 CST 2003


To trick Mac IE 5 into behaving, you can use this hack in your css...

/* hack to hide width from IE 5 Mac \*/

html {
  overflow: auto;
}

/* end hack*/


the important part to notice here is the "\" before the end of the
first CSS comment.

IE 5 Mac treats the "\" like an escape character...meaning it cancels
out the "*" which completes the comment.

Escaping the end of the first comment makes IE 5 Mac think everything
between "hack to hide width from IE 5 Mac" and "end hack" is one big
comment, so it ignores the style rule in between.

IE 5 Mac also has some buggy issues with width:auto, it will tend to
make block elements with a width set to "auto" as wide as the parent
element(often as wide as the screen), and not only as wide as needed.
If you set a width that works for IE 5 Mac, you can 'reset' it using
the hack above.

-0^0-
    -
Michael Barrett
mbarrrett at abouthalf.com


Outside of a dog, a book is a mans best friend. Inside of a dog, it's
too dark to read.
-Groucho Marx




More information about the thelist mailing list