Changing <HR> color

liunx

Guest
The <HR> (It's a grey bar) that you can put in a table. How can you change the color of it?<!--content--><hr style="color:#FF0000"><!--content-->or you can use html 4.x code:<br />
<br />
<hr size=5 color=red noshade width=50%><br />
<br />
<br />
and so on...<!--content-->>> <hr size=5 color=red noshade width=50%> <<<br />
<br />
You'll need at least the width=50% attribute quoted, like width="50%" as the attribute contains characters other than A to Z and 0 to 9. However, in HTML 4.01 it is recommended to quote all attributes:<br />
<br />
<hr size="5" color="red" noshade width="50%"><!--content-->Originally posted by giz <br />
>> <hr size=5 color=red noshade width=50%> <<<br />
<br />
You'll need at least the width=50% attribute quoted, like width="50%" as the attribute contains characters other than A to Z and 0 to 9. However, in HTML 4.01 it is recommended to quote all attributes:<br />
<br />
<hr size="5" color="red" noshade width="50%"> <br />
<br />
In certain cases, authors may specify the value of an attribute without any quotation marks. The attribute value may only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58).<!--content-->>> You'll need at least the width=50% attribute quoted, like width="50%" as the attribute contains characters other than A to Z and 0 to 9. <<<br />
<br />
<br />
That is, as the % symbol is not in the list, the attribute will need to be quoted.<!--content-->or for a simpler way you can try:<br />
<br />
<hr width=x%color="whateva"><!--content-->i noticed the HR color did not work in opera 6 though.<!--content-->If I'm not mistaken, <hr style="color: color_name"> and <hr color=color_name> only works with IE.<br />
<br />
However, I noticed that adding a background colour to the StyleSheet colours the horizontal rule for other browsers.<br />
<br />
For example:<br />
<hr style="color: red ; background-color: red"><!--content-->I just did<br />
<br />
<HR color="#whatevercode"><br />
<br />
Pretty simple huh?<!--content-->
 
Back
Top