467,163 Members | 964 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,163 developers. It's quick & easy.

Specify <HR> attribs with CSS?

Hi all,

How do I specify "noshade" as the style for an <HR>
element in my style sheet?

hr {
height: 1px;
color: #EEEEEE;
????
}

Cheers,

--
jc

Remove the -not from email
Jul 20 '05 #1
  • viewed: 2303
Share:
2 Replies
Jeremy Collins wrote:
Hi all,

How do I specify "noshade" as the style for an <HR>
element in my style sheet?

hr {
height: 1px;
color: #EEEEEE;
????
}


I prefer to use { height: 0 } to stop the variety of browser default styles
(which they implement in different ways), then make the line visible using the
top (or bottom) border. Hence:

hr { height: 0; border-style: solid; border-width: 1px 0 0 0; border-color:
#eee }

It works as expected in IE 6, IE 5, Firefox 0.8, Netscape 7.1, and Opera 7.23,
on W2000. I don't know under what circumstances it fails.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #2
Barry Pearson wrote:
I prefer to use { height: 0 } to stop the variety of browser default styles
(which they implement in different ways), then make the line visible using the
top (or bottom) border. Hence:

hr { height: 0; border-style: solid; border-width: 1px 0 0 0; border-color:
#eee }


Nice idea! Problem solved, many thanks.
--
jc

Remove the -not from email
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

34 posts views Thread by Mark Moore | last post: by
11 posts views Thread by Ted Mayett | last post: by
4 posts views Thread by Matthias Göbels | last post: by
3 posts views Thread by balakrishnan.dinesh@gmail.com | last post: by
13 posts views Thread by Mich | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.