How do I change the background color of an apDiv? I tried using background-color: eeeeee; and it looks fine in dreamweaver but in chrome and firefox the color remains white.
开发者_如何学Pythonhttp://www.sandboxes.tk/sandboxes/testproject.php
Kind regards
Pongy
The correct CSS would be
background-color: #eeeeee;
Some browsers may forgive the omission of the #, others will not.
You need to use background-color: #eeeeee;
instead of background-color: eeeeee;
.
Maybe linking to this is a little overboard, but from the spec:
The format of an RGB value in hexadecimal notation is a '#' immediately followed by either three or six hexadecimal characters.
Modern browsers don't forgive the omission of the #
, unless they are in Quirks Mode (=bad):
The CSS parser accepts colors not beginning with #.
精彩评论