helen1285
04-08-2006, 12:36 PM
Hi, this is starting to drive me crazy...ive just builkt the first page fo a site using div layers to centre the content as a box in the middle of a screen. i want the background of all of the rest of the site to be grey though (with the content box background white). so heres my code...
body { background-color: #CCC;
margin:50px 0px; padding:0px;
text-align:center;
}
#container {
width:700px;
height:700px;
margin:30px auto;
text-align:left;
padding:15px;
border:1px dashed #333;
}
(the applicable bit of the stylesheet) the grey backgroudn just doesnt seem to come up though :( anyone any ideas? thanks....
Arwen
04-08-2006, 01:49 PM
Try adding #CCCCCC instead of #CCC. If this doesn't work, show us your page.
helen1285
04-08-2006, 01:57 PM
nope didnt work :( the page is at www.evado.net/cuid/index2.php
ive tried using both external stylesheets and ones embedded into the html, but still no luck
Arwen
04-08-2006, 03:26 PM
I fixed your stylesheet (main.css) a bit:
body { background-color: #cccccc;
margin:50px 0px; padding:0px;
text-align:center;
}
#container {
width:700px;
height:700px;
margin:30px auto;
text-align:left;
padding:15px;
border:1px dashed #333;
background-color: #ffffff;
}
A:link
{ text-decoration: none; color:#000000; }
A:visited
{ text-decoration: none; color:#000000; }
A:active
{ text-decoration: none; color:#000000; }
A:hover
{ text-decoration: none; color:#000000;
}
.style8 {font-weight: bold}
.style9 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #000066;
}
.style1 {color: #CECECE}
.style2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
.style3 {
color: #000066;
font-weight: bold;
}
.style7 {
font-size: 12px;
color: #FFFFFF;
}
.style11 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #FFFFFF; }
Now remove this:
<style type="text/css">
body { background: #cccccc;
}
#container { background: #ffffff;
}
</style>
from your page. ;)
helen1285
04-08-2006, 08:18 PM
thanks....but it still doesn't seem to work =S im clueless!
J to the izzosh
04-09-2006, 05:46 PM
It's because you have a second style sheet linked to your page, outside of your header:
<link href="ffnews_style.css" type="text/css" rel="stylesheet">
The body background colour is set to white in that sheet. I would suggest amalgamating them, as it's just causing redundancy and problems for you. Also, all external style sheets should be referenced in your page's header.