Click to See Complete Forum and Search --> : Need help making a horizontal rule a color


NJDevil
01-07-2008, 07:28 PM
My HTML book tells me how to make a horizontal rule, but as far as color only says to type "noshade" to make it solid. I can't figure out how to make it blue.... thanks :confused:

scragar
01-07-2008, 07:54 PM
<style type='text/css'>
hr{
border-color: blue;
}
</style>
....
text <hr> see, blue.works for opera atleast....

after a little experimenting I found that, on opera atleast, a hr is just an empty element, with a grey border. changing this to blue changes that. no idea about on other browsers though, so you may have to try things like background-color and height to see if you can make it show the way you want.

edit: this works on firefox and opera:
hr{
border: 1px solid blue;
background-color: blue;
height: 1px;
}
that also works on IE 5 and 6, still not tested on IE7 though.

scragar
01-07-2008, 08:18 PM
it has now been confirmed to work on konqueror, safari, opera and IEs 5-7.
<style type='text/css'>
hr{
border: 1px solid blue;
background-color: blue;
height: 1px;
}
</style>

NJDevil
01-08-2008, 10:06 PM
thank you verrry much