css bg color

Hi-<br />
<br />
I have my bgcolor set to white, but it's black. Why?<br />
[ Using browsers: IE5.5, NS7.0 ]<br />
<br />
Here is my css for the BODY:<br />
body <br />
{<br />
background-color: white;<br />
background-image: url(images/bg-bar_820x1_gif.gif);<br />
text-align: center;<br />
color: white;<br />
margin-left:0px;<br />
margin-top:0px;<br />
margin-width:0px;<br />
margin-height:0px;<br />
}<br />
<br />
A second question is, the COLOR:white; property is for text correct?<br />
<br />
Thanks, Gandalf<br />
:D<!--content-->I'm guessing that the bg-bar_820x1_gif.gif image is pretty much black. Try making it no-repeat (background-repeat: no-repeat; )<br />
<br />
However, you'll run into another problem then - your white text will be on a white background, which in my, admittedly limited to 40+ years, experience can be a tad difficult for many of us, not all of course, to read.<br />
<br />
Actually, in truth, I think you're trying to set things up in a fairly funky way by having both an image and a color selection in the background property. If you want to use the bar thingy why not bung it in a cell in a table or something like that?<br />
<br />
Neil<!--content-->Here is what it looks like: <!-- m --><a class="postlink" href="http://77scars.netfirms.com/test/index.html">http://77scars.netfirms.com/test/index.html</a><!-- m --><br />
<br />
But the black on the right side of the page is bgcolor, not part of the image. The image end at the end of the white (going from left to right).<br />
<br />
Doesn't make sense to me.<br />
<br />
Here is a copy of the source:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><br />
<br />
<html><br />
<head><br />
<title>title goes here</title><br />
<br />
<link href=http://www.htmlforums.com/archive/index.php/"css.css" rel="stylesheet" style="text/css"><br />
</head><br />
<br />
<body><br />
<br />
sdfsdfsdf<br />
</body><br />
</html><br />
<br />
<br />
<br />
...and the <BODY> properties are:<br />
<br />
body <br />
{<br />
background-color: white;<br />
background-image: url(bg-bar_820x1_gif.gif);<br />
text-align: center;<br />
color: white;<br />
margin-left:0px;<br />
margin-top:0px;<br />
margin-width:0px;<br />
margin-height:0px;<br />
}<br />
<br />
<br />
<br />
Thanks, Gandalf<br />
:D<!--content-->Slightly Off Topic: This line got mashed in my browser - an Anchor within an Anchor (<!-- m --><a class="postlink" href="http://validator.w3.org/check?uri=http%3A%2F%2F77scars.netfirms.com%2Ftest%2Findex.html&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&ss=">http://validator.w3.org/check?uri=http% ... lly%29&ss=</a><!-- m -->):<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"http://www.netfirms.com"><font size="2"><a href="http://www.netfirms.com">This site is hosted by <b>Netfirms</b> Web Hosting</a></font></a><!--content-->*non-intelligent voice* huh?<!--content-->Sorry Giz, but I didn't understand what you were saying.<br />
<br />
This bgcolor problem is frusterating me. It's so simple! Why doesn't it work!!?<br />
<br />
Here is what it looks like: <!-- m --><a class="postlink" href="http://77scars.netfirms.com/test/index.html">http://77scars.netfirms.com/test/index.html</a><!-- m --><br />
<br />
Thanks, Gandalf<br />
:D<!--content-->Yeah!<br />
<br />
I fixed it!<br />
<br />
As, Option1 said:<br />
-----------------<br />
I'm guessing that the bg-bar_820x1_gif.gif image is pretty much black. Try making it no-repeat (background-repeat: no-repeat; )<br />
-----------------<br />
(background-repeat: repeat-y; )<------solved the problem<br />
<br />
I read it, but for some reason ignored it! Sheesh!<br />
<br />
Thank you, Gandalf<br />
:D<!--content-->My original comment means that you have a non-valid construct like:<br />
<A HREF ..... <A HREF ..... </A> ..... </A> in the code.<br />
<br />
The automated CSS checker: <!-- m --><a class="postlink" href="http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2F77scars.netfirms.com%2Ftest%2Findex.html&warning=1&profile=css2">http://jigsaw.w3.org/css-validator/vali ... ofile=css2</a><!-- m --> seems mainly happy with the CSS. Aaargh, it must be some wierd bug. I can't see what the problem with the CSS is.<br />
<br />
Hmm: It was fixed just before I looked at it.<!--content-->Well, one of the problems listed is:<br />
<br />
URI : <!-- m --><a class="postlink" href="http://77scars.netfirms.com/test/index.html">http://77scars.netfirms.com/test/index.html</a><!-- m --><br />
Line: 7 <br />
Parse Error - text/css <br />
<br />
<br />
The reason for this is because I type this:<br />
<br />
<br />
style="text/css"<br />
<br />
Which SHOULD HAVE BEEN:<br />
<br />
type="text/css"<br />
<br />
<br />
Ty, G<br />
:D<!--content-->Second of all, the anchor inside another anchor problem is the result of poor scripting on NetFirms part. Because the lines that have problem on that page are from a banner ad, because it's a free site. <br />
<br />
None of the values are quoted and there are unneccessary properties such as, height in the <table>. Also, they use deprecated tags such as, <center>.<br />
<br />
<br />
<center><br />
<table height=0 width=596 border=0 cellpadding=0 cellspacing=0><br />
<tr><br />
<br />
<td valign="top"><br />
<iframe src=http://www.htmlforums.com/archive/index.php/"http://network.realmedia.com/RealMedia/ads/adstream_sx.ads/netfirms/ros@Position1?" width=468 height=60 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no bordercolor="#000000"><br />
<script language="JavaScript1.1" src=http://www.htmlforums.com/archive/index.php/"http://network.realmedia.com/RealMedia/ads/adstream_jx.ads/netfirms/ros@Position1?"><br />
</script><br />
<noscript><br />
<a href=http://www.htmlforums.com/archive/index.php/"http://network.realmedia.com/RealMedia/ads/click_nx.ads/netfirms/ros@Position1?x"><br />
<img src=http://www.htmlforums.com/archive/index.php/"http://network.realmedia.com/RealMedia/ads/adstream_nx.ads/netfirms/ros@Position1?x" alt="Click Here" border="0"></a><br><br />
</noscript><br />
</iframe><br />
</td><br />
<br />
<td valign="top"><br />
<a href=http://www.htmlforums.com/archive/index.php/"http://www.netfirms.com"><img border="0" alt="Free Web Hosting by Netfirms" src="/nf-images/freewebhosting.gif" width="120" height="60"></a><br><br />
</td><br />
<br />
</tr><br />
<br />
<tr><br />
<br />
<td colspan="2" align="center"><br />
<img border="0" src=http://www.htmlforums.com/archive/index.php/"/nf-images/freewebhosting.webhosting" width="1" height="1" alt="Free Web Hosting by Netfirms"><br><br />
<a href=http://www.htmlforums.com/archive/index.php/"http://www.netfirms.com"><font size="2"><a href="http://www.netfirms.com">This site is hosted by <b>Netfirms</b> Web Hosting</a></font></a><br />
</td><br />
<br />
</tr><br />
<br />
</table><br />
</center><br />
<br />
<br />
<br />
Think I will be writing them an email in regards to this issue which affects the DTD and validation by W3C.<br />
<br />
Gandalf<br />
:D<!--content-->
 
Back
Top