background css color

  • Thread starter Thread starter Mark
  • Start date Start date
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.
 
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.
 
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.

-------------------------------------------------------------------------
 
Back
Top