Welcome to WebmasterWorld Guest from 54.162.139.217

Forum Moderators: not2easy

Message Too Old, No Replies

Changing <hr /> color

..with css - How is it done?

     
3:23 pm on Oct 27, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


Hi everyone,

I can't seem to change the color of my horizontal rules?

This doesn't work:

hr {
color: #CC0000;
}

Why not, and what's the solution?

Thanks

Nick

3:56 pm on Oct 27, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 10, 2001
posts:748
votes: 0


I have used this property on <hr>, however it only seems to work on IE. Mozilla and Opera do not seen to support it, and that may be because they're being strict about the definition:

This property describes the foreground color of an element's text content...

[w3.org...]

4:04 pm on Oct 27, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


Mozilla and Opera

Right! Building on Linuz so that's exactly waht I'm testing on ;)

Cheers

Nick

2:59 am on Nov 2, 2002 (gmt 0)

New User

10+ Year Member

joined:Oct 28, 2002
posts:16
votes: 0


I had this problem some time ago... after some hunting around I found this page:

[sovavsiti.cz...]

hope that helps.

5:10 pm on Nov 2, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 3, 2002
posts:1590
votes: 0


You can also define an empty div which only has a top or bottom border and use this in place of an hr. This way you can also have dotted and dashed hr's.
6:10 pm on Nov 2, 2002 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lorax is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Mar 31, 2002
posts:7575
votes: 0


That's brilliant edit_g!
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members