background css color

M

Mark

this should be easy but it doesn't seem to be. I am trying to add a
background color to a css page I have created.

What exactly should I put in to get it to display. Do I go to the style
area and create the name first and then past or type in the code? See below

..bg { <body bgcolor="black"> }


Whatever it is I am doing the .css page I am putting the color into does not
recognize it. I can get fonts etc. to change but not the background color.
 
M

Murray

Actually, try -

body { background-color:#000; }

or

body { background-color:black; }

The background style is a complex aggregate of color, image, position,
repeat, etc., and may be a bit confusing.
 
W

Windsun

Shorthand code if pairs of numbers:

#FFF = #FFFFFF, #999 = #999999, #3F7 = #33FF77

Personally I never use it, I prefer to keep all colors consistent in coding.

-------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top