Forum Moderators: not2easy

Message Too Old, No Replies

Background color not working

         

jbhaxor

1:33 am on Dec 20, 2005 (gmt 0)



I'm trying to set a background color to my container but for some reason it won't take. I also tried adding a background image and that wouldn't show up either.

CSS

body {
background: url(images/stripe.gif);
margin: 0;
text-align: center;
}

#container
{
background-color: #ffffff;
margin: 0 auto;
width: 730px;
position: relative;
text-align: left;
}

#logo {
position: absolute;
top: 30px; right: 26px;
z-index: 3;
}

#pagetop {
position: absolute;
background: #FFFFFF url(images/pagetop.gif) no-repeat center;
width: 730px; height: 60px;
top: 0;
z-index: 2;
}

#text {
top: 200px;
left: 30px;
width: 650px;
position: absolute;
z-index: 1;
}

#text p {
margin: 20px 50px;
line-height: 120%;
padding: 5px 0;
font-family: "Trebuchet MS", Arial, Verdana, sans-serif;
color: #000000;
}

HTML

<BODY>

<div id="container">

<div id="pagetop"></div><!-- End Pagetop -->

<div id="logo"><a href="/"><img src="images/logo.gif" alt="" border="0"></a></div><!-- End Logo -->

<div id="text">

<p>Example text</p>

</div><!-- End Text -->

</div><!-- End Container -->

</BODY>

coho75

2:09 am on Dec 20, 2005 (gmt 0)

10+ Year Member



You have the background color set to #ffffff. That is the code for the color white. You won't be able to see it even if it is working.

dwighty

10:02 am on Dec 20, 2005 (gmt 0)

10+ Year Member



If you want a white background the just do this:

#container
{
background: #fff; /* To Set a White Background */
margin: 0 auto;
width: 730px;
position: relative;
text-align: left;
}

Change to #fff to what code you want so

e.g.
background: #000;
background: #999; etc