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

  • Thread starter balakrishnan.dinesh
  • Start date
B

balakrishnan.dinesh

hi frnds,
In my html code, i have used <hr> tag.
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...
 
E

Evertjan.

wrote on 11 sep 2006 in comp.lang.javascript:
hi frnds,
In my html code, i have used <hr> tag.
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.
 
C

cwdjrxyz

Evertjan. said:
wrote on 11 sep 2006 in comp.lang.javascript:


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.
 
E

Evertjan.

cwdjrxyz wrote on 11 sep 2006 in comp.lang.javascript:
!!!!!!!!!



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 <hr> mess and try something like:

<div style='border-bottom:3px green solid;width:95%;'></div>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top