[thelist] [TIP] Solution: Zero body margin with CSS in NN4.x

Mark Howells mark at mountain.ch
Fri Mar 8 12:29:01 CST 2002


>> OK, so you must use the @import statement so that all browsers work with a 0
>> border if you include the negative number to compensate for NN's inadequacy,
>> right?
>
> Am I wrong in remembering reading that the @impart thing for IE is
> exploiting a bug?

@import is understood by IE, NN6+, Opera and so on, while the only common
browsers that don't support it are NN4 (always) and IE4 (in some instances).
These are bugs in the latter two browsers and the use of @import to hide
styles from them is a "legitimate" method, which is in common and frequent
use.

> I've been working under the theory that document.writing a <link> to
> a stylesheet is superior ... for one thing people that want to
> override px size definitions of fonts can just turn JavaScript off.

It's worth noting that if Javascript is disabled in NN4, NO CSS AT ALL is
displayed, due to the fact that NN4 uses the Javascript engine to render
CSS.

A further difficulty of your approach is that if there is no Javascript in
the browser, many functional aspects are removed from sites as well. The
advantages of using the solution that I brought to the list, combined with
relative font sizing, are:

- there's no need for the user to do anything to get the font to a size that
is legible for them

- they can take advantage of the remaining Javascript functionality in the
site

- the page can be written in valid XHTML Strict, thereby reducing the amount
of code required in the page (over a tables-based layout) and ensuring
forward-compatibility

Regards
Mark Howells
<http://www.mark.ac/evl/>




More information about the thelist mailing list