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

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

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a

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

P: n/a
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.