Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

backgound-color not working

Status
Not open for further replies.

Herman144

Programmer
Aug 7, 2004
2
US
In my style sheet I have:
body {
margin : 0;
background-color : #cfcfdb;
}

The style sheet is linked to the html sheet and works for everything else. The body is still white? The only way I have gotten the body to change is by using bgcolor in html sheet. Am I doing something wrong??
 
What browser are you using? It worked for me in Mozilla. Are you sure you're not using the style in addition to the bgcolor attribute in the body tag? Maybe you're setting the background-color of the body in two different locations?

*cLFlaVA
----------------------------
A pirate walks into a bar with a huge ship's steering wheel down his pants.
The bartender asks, "Are you aware that you have a steering wheel down your pants?"
The pirate replies, "Arrrrr! It's driving me nuts!
 
I did some testing and did get it to work on a new sheet - so there must be something else in my code stopping it from acting as expected. Thanks all for you replies.
 
You can check your stylesheet validates at
Otherwise, I'd look for either another [tt]background-color[/tt] declaration, or a [tt]background[/tt] declaration.

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top