Click to See Complete Forum and Search --> : IE and Firefox


kevinmcqueen
01-22-2005, 05:38 PM
Help...

I have a hr tag in my page and have the color of the area set to red, so the hr appears red in firefox...

but it appears just grey in IE. Is there anyway of changing this? or is it just that IE is poo?

Triumph
01-22-2005, 05:47 PM
Don't quote me on this but I don't thing <hr /> has a color attribute. I'm gonna go look it up and report back to you. :)

Triumph
01-22-2005, 05:55 PM
Looks like a big negatory: This page is not Valid HTML 4.01 Transitional!
Below are the results of attempting to parse this document with an SGML parser.
Line 15, column 11: there is no attribute "COLOR"

<hr color="#ff00ff"> :)

kevinmcqueen
01-22-2005, 06:08 PM
OK, thank you...

Change of plan then.

Thank You

Triumph
01-22-2005, 06:15 PM
Nothing wrong with a 1px square stretched to the percentage you need, eh?

kevinmcqueen
01-22-2005, 06:32 PM
something like that ;-)

MstrBob
01-22-2005, 06:39 PM
Setting both the color and background via CSS will change the color for IE and Firefox respectively.

hr {
background:#ff0000;
color:#ff0000;
}

Green-Beast
01-22-2005, 07:06 PM
Originally posted by MstrBob
Setting both the color and background via CSS will change the color for IE and Firefox respectively.

hr {
background:#ff0000;
color:#ff0000;
}

I'll second that. I ran into this myself for a x-strict site, there were HR classes for different sections on top of it. I approached it like this:

.HRXS { height: 2px;
width: 115px;
color: #2F4F2F;
background: #2F4F2F;
}

.HRXL { height: 4px;
width: 400px;
color: #2F4F2F;
background: #2F4F2F;
}

I marked up like this:

<hr class="HRXS" />

-or-

<hr class="HRXL" />

Don't know if I did it right but it works across the various browsers and it validates (markup and CSS) so I'm happy with the results.