Possible Duplicate:
CSS : change color of hr tag
how do you change the color of an hr tag? i looked it up and found this, but it didnt work..
hr{
color:#CCC;
background-color:#CCC;
}
Any ideas?
The color of the <hr> tag can be set by using the background-color property in CSS.
Try setting it to white on white background. These two will work: Either 1) color:white; border-style:solid; or 2) border-color:white; border-style:solid; .
tl;dr: You can't. Not only does hr not have a color attribute in XHTML, it never had a color attribute, in any version of HTML! Just use CSS already.
Style the border.
hr{
border: 1px solid #ccc;
}
Just change the border color. For instance, this HTML produces a red horizontal row.
<hr style="border: 1px solid #f00" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With