468,107 Members | 1,281 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

how to set color on <hr> tag for opera browser

hi frnds,
In my html code, i have used <hrtag.
Im using it as "<hr color=red>", So the respective hr line color is
red in Mozila and IE browsers,
But it is not showing the color in Opera browser, It just showing the
line as black.

Can anyone tell , how to color the hr tag line for opera browsers.

Rgrds
Dinesh...

Sep 11 '06 #1
3 8189
wrote on 11 sep 2006 in comp.lang.javascript:
hi frnds,
In my html code, i have used <hrtag.
Im using it as "<hr color=red>", So the respective hr line color is
red in Mozila and IE browsers,
But it is not showing the color in Opera browser, It just showing the
line as black.

Can anyone tell , how to color the hr tag line for opera browsers.
Wrong NG, has nothing to do with Javascript.

===========================================

This colours red in IE and green in FF, nice compatibility!

<hr style='color:red;background-color:green;height:11px;'>

Sorry, cannot test Opera.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Sep 11 '06 #2

Evertjan. wrote:
wrote on 11 sep 2006 in comp.lang.javascript:
hi frnds,
In my html code, i have used <hrtag.
Im using it as "<hr color=red>", So the respective hr line color is
red in Mozila and IE browsers,
But it is not showing the color in Opera browser, It just showing the
line as black.

Can anyone tell , how to color the hr tag line for opera browsers.

Wrong NG, has nothing to do with Javascript.

===========================================

This colours red in IE and green in FF, nice compatibility!

<hr style='color:red;background-color:green;height:11px;'>

Sorry, cannot test Opera.

You have to kick it and twist its tail :-). See an example of a red hr
at http://www.cwdjr.info/dhtml/7veilsDance3.html . It works on the most
recent versions of IE6, Firefox, Opera, Netscape, and even W3Cs
Amaya(although Amaya does not have script support and thus shows
nothing else on this page).

I used <hr style='color:#ff0001;background-color:#ff0000;height:5px;'>.
The color that applies to the hr is the background-color. Since you are
not using text in a hr, no color is necessary. However the W3C CSS
validator will often bitch and give you a warning if you do not use
color and background color as a pair. Thus I used #ff0001 as the color.
If some browser decides to respond to the color rather than the
background-color the hr will apear the same since the 2 reds specified
are so close that the eye can not tell them apart. Although this is
somewhat of a hack, the page still validates as html and CSS at the W3C
validators.

Sep 11 '06 #3
cwdjrxyz wrote on 11 sep 2006 in comp.lang.javascript:
>
Evertjan. wrote:
>wrote on 11 sep 2006 in comp.lang.javascript:
hi frnds,
In my html code, i have used <hrtag.
Im using it as "<hr color=red>", So the respective hr line color is
red in Mozila and IE browsers,
But it is not showing the color in Opera browser, It just showing
the
line as black.

Can anyone tell , how to color the hr tag line for opera browsers.

Wrong NG, has nothing to do with Javascript.
!!!!!!!!!
>===========================================

This colours red in IE and green in FF, nice compatibility!

<hr style='color:red;background-color:green;height:11px;'>

Sorry, cannot test Opera.


You have to kick it and twist its tail :-). See an example of a red hr
at http://www.cwdjr.info/dhtml/7veilsDance3.html . It works on the most
recent versions of IE6, Firefox, Opera, Netscape, and even W3Cs
Amaya(although Amaya does not have script support and thus shows
nothing else on this page).

I used <hr style='color:#ff0001;background-color:#ff0000;height:5px;'>.
The color that applies to the hr is the background-color. Since you are
not using text in a hr, no color is necessary. However the W3C CSS
validator will often bitch and give you a warning if you do not use
color and background color as a pair. Thus I used #ff0001 as the color.
If some browser decides to respond to the color rather than the
background-color the hr will apear the same since the 2 reds specified
are so close that the eye can not tell them apart. Although this is
somewhat of a hack, the page still validates as html and CSS at the W3C
validators.
[I personally am not interested in validation, but in cross browser
adequate display.]

Alternatively, skip the whole <hrmess and try something like:

<div style='border-bottom:3px green solid;width:95%;'></div>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Sep 11 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

34 posts views Thread by Mark Moore | last post: by
2 posts views Thread by Jeremy Collins | last post: by
11 posts views Thread by Ted Mayett | last post: by
4 posts views Thread by Matthias GŲbels | last post: by
13 posts views Thread by Mich | last post: by
12 posts views Thread by maya | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.