Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

CSS and body tag

syntax or NN 4.X?

3:29 pm on Jul 30, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:June 21, 2000
votes: 0


I have this line in my ext. CSS file...

body { margin-top: 0px; margin-left: 0px; margin-right: 0px; margin-bottom: 0px; font-family: "Lucida Handwriting"; font-size: 18px; font-weight: normal; color: #C7EFF5; background-color: #000; }

All seems to work in IE/Opera but NN won't display <p> text. I thought the body statement was covered under CSS level 1 for NN 4.x support. Is my syntax wrong or is this CSS level 2 and NN 4.X can not display/read it?



3:42 pm on July 30, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
votes: 0

You dont need those quotes:

body {
margin: 0; /* this will serve just as well */
font- family: Lucida Handwriting; /* you need some backups here */
font-size: 18px;
color: #C7EFF5;
background-color: #000;


5:34 pm on July 30, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:June 7, 2002
votes: 0

NS 4 has some serious problems with CSS, and this is one of the worst: it concerns inheritance.

Basically, block-level text elements, under certain conditions, do not inherit properties as they are supposed to. These "certain conditions", though, just happen to be the most common conditions you will ever meet.

I notice you've set the background colour to black. Drag your cursor across the page; I can guarantee you'll find the text is there... but in the default colour (black) and probably also the default font and size. Black on black is invisible.

The workaround -- which works in most cases, but not all -- is to apply font and colour styles to every block-level and list element you will need. My stylesheets often contain at least one line that begins:

p, blockquote, ol, ul, li, div { ...

Even then it's touch-and-go. The first block-level element after a table or a div can be very unpredictable, and nested lists will resist any attempt to make them behave in any reasonable fashion at all.