By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,445 Members | 1,160 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,445 IT Pros & Developers. It's quick & easy.

How to define the HR element using CSS?

P: n/a
Hi,

I wonder which style sheet properties to use on specifying a HR element. Can
someone please enlighten me here?

<hr style="border: 1px solid gray">
doesn't substitute
<hr noshade size="1" color="Gray">

it's 2 pixels on IE6...

TIA,
Axel Dahmen
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
> I wonder which style sheet properties to use on specifying a HR
element. Can
someone please enlighten me here?

<hr style="border: 1px solid gray">
doesn't substitute
<hr noshade size="1" color="Gray">

it's 2 pixels on IE6...


That seems reasonable as you have defined a 1px border top and bottom.
Have a play around with the 'height' with and without borders and
using foreground and background colours to see what happens. You
might want to set the foreground and background colours the same for
best cross browser support.

Jul 20 '05 #2

P: n/a
Thanks for your tips Graham. I'll give it a try and "fiddle" around with the
properties you've mentioned.

------------------
"Graham J" <in***************@orangebucket.co.uk> schrieb im Newsbeitrag
news:bn*************@ID-203032.news.uni-berlin.de...
I wonder which style sheet properties to use on specifying a HR

element. Can
someone please enlighten me here?

<hr style="border: 1px solid gray">
doesn't substitute
<hr noshade size="1" color="Gray">

it's 2 pixels on IE6...


That seems reasonable as you have defined a 1px border top and bottom.
Have a play around with the 'height' with and without borders and
using foreground and background colours to see what happens. You
might want to set the foreground and background colours the same for
best cross browser support.

Jul 20 '05 #3

P: n/a
Axel Dahmen wrote:
Hi,

I wonder which style sheet properties to use on specifying a HR element. Can
someone please enlighten me here?

<hr style="border: 1px solid gray">
doesn't substitute
<hr noshade size="1" color="Gray">

Well, you should take out the html styling (noshade etc).

Here's a few examples:

http://porjes.com/pichr.html
http://porjes.com/hrs.html
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.