Welcome to WebmasterWorld Guest from 54.159.190.106

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)

10+ Year Member



Hi,

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?

Confused,

Brian

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

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



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;
}

Nick

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

10+ Year Member



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month