Click to See Complete Forum and Search --> : CSS background color
lionscub144
01-13-2008, 07:11 PM
whats the proper way to do background color in css?
this is how i was trying and it didnt work.
<body background-color: #000000;>
i also tried
<body bgcolor: #000000;>
so far its not working i also tried declaring it in my style declaration underneath the header. what gives?
johnnyblotter
01-13-2008, 07:29 PM
body {
background-color:#00000;
}
lionscub144
01-13-2008, 08:31 PM
for some reason its not working even when changed i dont get it ive done this before and it worked.
this is the first way ive tried
<style type="text/css">
body { background-color:#00000; }
</style>
and then i tried this way.
<body background-color: #000000; >
ray326
01-13-2008, 11:32 PM
<style type="text/css">
body { background-color:#00000; }
</style>
That one should work. You are putting it into the head, right?
lionscub144
01-14-2008, 12:24 AM
yes im thinking maybe its just a browser thing ive tried about 5 times the exact way above.
i tried inline to.
lionscub144
01-14-2008, 12:31 AM
as a matter of fact i cut and pasted what u posted to double check
this is whats in there
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type"
content="text/html; charset=utf-8" />
<title>.::Ahavat Tzion::.</title>
<style type="text/css">
body { background-color:#00000; }
</style>
<head/>
maybe the charset is in the way??im not sure where im messing it up
WebJoel
01-14-2008, 06:36 AM
<style type="text/css">
body { background-color:#00000; }
</style>
That one should work. You are putting it into the head, right? -You need one more "0" to get this to work...
lionscub144
01-14-2008, 12:16 PM
thanks dude thats what it was i need to pay closer attention.
thanks Joel
ray326
01-14-2008, 12:33 PM
-You need one more "0" to get this to work...Or two fewer. :) Good catch.
lionscub144
01-14-2008, 06:08 PM
so it can be shorthanded then? like #000 ?
ray326
01-15-2008, 10:20 PM
Yep. When the RGB values are doubled up, e.g. #112244, then you can use the single distinct digit (hexit?) for each, #124.