472,107 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,107 software developers and data experts.

color of horizontal line

Hi,
ist it possible to change the Color of a horizontal <hl> line?
i tried with background-color and color but it didn't work?
what attribut changes the color?
Jul 21 '05 #1
6 25974
Wilhelm Kutting wrote:
Hi,
ist it possible to change the Color of a horizontal <hl> line?
Did you mean <hr>?
i tried with background-color and color but it didn't work?
what attribut changes the color?


Try border-color.
Jul 21 '05 #2
Once upon a time *Wilhelm Kutting* wrote:
Hi,
ist it possible to change the Color of a horizontal <hl> line?
i tried with background-color and color but it didn't work?
what attribut changes the color?


This is an example that I use

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

Play with the values to make look as you prefer

--
/Arne
http://web.telia.com/~u97802964/

If you owe the bank a million, you have a problem.
If you owe the bank ten million, the bank has a problem! (Unknown)
Jul 21 '05 #3
Hi,
ist it possible to change the Color of a horizontal <hl> line?
i tried with background-color and color but it didn't work?
what attribut changes the color?


I would try to avoid <hr>s (I a assume you meant them). Usually <hr>s
are used to optically seperate conent. This can be accomplished by using
a border-bottom.

Chris
Jul 21 '05 #4
Chris Leipold wrote:
Hi,
ist it possible to change the Color of a horizontal <hl> line?
i tried with background-color and color but it didn't work?
what attribut changes the color?


I would try to avoid <hr>s (I a assume you meant them). Usually <hr>s
are used to optically seperate conent. This can be accomplished by using
a border-bottom.


Actually I think it's better to leave the the HRs *in* and use CSS to
disguise them if necessary. That way you get much better results in text and
audio browsers.

Wrap the HRs inside DIV elements like this:

<DIV class="hr"><HR></DIV>

and put this in your CSS file:

HR {
display: none;
}

DIV.hr {
margin: 2.0em 0;
height: 0.4em;
background-color: #fc9;
clear: both;
}

Here's an article you might find useful:
<http://diveintoaccessibility.org/day..._rules_or_faki
ng_them_properly.html>

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Jul 21 '05 #5
>>Hi,
ist it possible to change the Color of a horizontal <hl> line?
i tried with background-color and color but it didn't work?
what attribut changes the color?


I would try to avoid <hr>s (I a assume you meant them). Usually <hr>s
are used to optically seperate conent. This can be accomplished by using
a border-bottom.


Actually I think it's better to leave the the HRs *in* and use CSS to
disguise them if necessary. That way you get much better results in text and
audio browsers.


IMO this depends if the hr has only represental functions or if it is
content.
And the argument that NS4 displays a correct hr is poor. NS4-users must
be punished. ;-)

CL
Jul 21 '05 #6
Works well in IE and Moz...

HR {
background-color: #006699; /* mozilla */
border: 0px; /* fixes mozilla height */
clear: left;
color: #006699; /* ie */
float: left;
height: 1px;
margin: 4px 0px 4px 0px;
width: 99%;
}

Jul 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Marco Liedekerken | last post: by
4 posts views Thread by Sakharam Phapale | last post: by
2 posts views Thread by musicmouse | last post: by
2 posts views Thread by Eduard | last post: by
2 posts views Thread by Martin Schneider | last post: by
2 posts views Thread by Csaba Gabor | last post: by
2 posts views Thread by laredotornado | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.