Click to See Complete Forum and Search --> : HR Colour


Geat
02-11-2003, 10:24 AM
This is probably quite stupid, but how do you define the colour of a <HR> in Netscape (4.x)?

Should:

<hr background-color="#009933" size="1" color="#009933">

Work?

CyCo
02-11-2003, 11:24 AM
Here's a cross-browser method that seems to work.

<style type="text/css">
<!--
hr {
color: blue;
background-color: blue;
border: 0;
height: 1px;
}

-->
</style>

gil davis
02-11-2003, 11:40 AM
Originally posted by Geat
Should:

<hr background-color="#009933" size="1" color="#009933">

Work?No. <HR> has no text, so I would doubt there is any background. The tag is defined at http://developer.netscape.com/docs/manuals/htmlguid/tags15.htm#1045422 and has no provision for any colors. If you want cross-browser compatible "rules", try using an image:

<img src="red.gif" height=4px width=100%>

Geat
02-12-2003, 03:38 AM
For some reason the style sheet method isn't working in NS 4.7. Never mind, it's only a pixel's height, not really that noticeable. I'll cut my losses and leave it.

spufi
02-12-2003, 09:08 AM
<div style="background-color:#9E575A; font-size:2px; border:1px solid #000000;">non breaking space code</div>

I haven't tried this on old Netscape browsers, but you could try it out.

Geat
02-12-2003, 09:19 AM
That's quite a good little idea, and I'll use it if I have to...

Cheers!