[thelist] NS 4.x/CSS margin and background-color problems
Rob Oviatt
n6appweb at nb.aibn.com
Fri Nov 16 12:19:50 CST 2001
My boss and I want us to convert our company web site to W3C compliance.
And I've pretty much gotten a working copy of our site there, but I'm
having difficulty getting NS 4.x on PC or MAC to play nice.
Problem: background color
.promotext {
color : #000000;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size : 11px;
font-weight : normal;
}
.headingpromo {
color : #ff9933;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size : 10px;
font-weight : bold;
}
These two classes get flagged by the W3C validator due to their lack of the
'background-color' attribute. It works fine in the big two browsers (v4
and up), but I want to get rid of the warning. If I add 'background-color:
transparent;', the table cells using these classes have a black
backround. The body bgcolor is white, and we're using a grey navigation
bar on the right hand side of the page which also have table cells in it
using these classes, so I can't assign a white background in the class.
Problem: body margins
body {
color : #000000;
background-color: #ffffff;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size : 10px;
font-weight : normal;
margin-bottom : 0;
margin-left : 0;
margin-right : 0;
margin-top : 0;
}
The W3C validator doesn't like marginheight and marginwidth (any margin
related attributes actually) in the body tag, and yet NS 4.x doesn't seem
to pay much attention to the margin declarations in the above
example. I've also tried the same setup with the measurement units
specified (ie margin-top:0px;), and using the shorthand (margin: 0 0 0 0;)
Any suggestions would be appreciated.
Rob Oviatt
Web Developer / Typesetter
Appleby Color Lab
phone: (506) 459-2320
email: applebyweb at nb.aibn.com
web site: http://www.applebycolorlab.com/
More information about the thelist
mailing list