homepage Welcome to WebmasterWorld Guest from 54.166.85.209
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Changing <hr /> color
..with css - How is it done?
Nick_W

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



 
Msg#: 366 posted 3:23 pm on Oct 27, 2002 (gmt 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

 

bobriggs

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 366 posted 3:56 pm on Oct 27, 2002 (gmt 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...]

Nick_W

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



 
Msg#: 366 posted 4:04 pm on Oct 27, 2002 (gmt 0)

Mozilla and Opera

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

Cheers

Nick

imaputz

10+ Year Member



 
Msg#: 366 posted 2:59 am on Nov 2, 2002 (gmt 0)

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

[sovavsiti.cz...]

hope that helps.

edit_g

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 366 posted 5:10 pm on Nov 2, 2002 (gmt 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.

lorax

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



 
Msg#: 366 posted 6:10 pm on Nov 2, 2002 (gmt 0)

That's brilliant edit_g!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved