Welcome to WebmasterWorld Guest from 23.20.230.24

Forum Moderators: incrediBILL

Message Too Old, No Replies

HR not validating for any Netscape

Problem getting hr color to validate

     
7:47 pm on Jul 5, 2004 (gmt 0)

10+ Year Member



I have this code on my site
<hr size="1" width="80%" COLOR="#b4b4b4" ALIGN="RIGHT" NOSHADE>

Using an html validator, it shows that the "color" attribute will not validate for any version of Netscape.

What am I doing wrong?

Thanks!
Mike

7:52 pm on Jul 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try using inline CSS:

<hr size="1" style="width: "80%; color: #b4b4b4; text-align: right;" NOSHADE>

Not sure how to set the size on hr, and I don't know what NOSHADE is :)

9:35 pm on Jul 5, 2004 (gmt 0)

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Pretty sure it still won't colorize in Netscape/Mozilla/Firebird/et al... even with the CSS.
If anyone knows how, I'd like to know also.
9:44 pm on Jul 5, 2004 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I stopped using <hr> years ago. I just create a small gif image and use the browser to re-size it to my needs. Just a couple extra bytes used for solid functionality.

If it's just 1-color (maybe 2-color if you want a shading) then this is a situation where changing width in the html is no problem whatsoever, and it works in any browser where images are turned on. And if images are turned off, then you still get a divider created by the placeholder for the image.

And if the image is a single color that harmonizes with your site's design, then you can also resize it in many other ways besides substituting for an <hr> - use it for a tiled background to create a big color block, for example.

10:31 pm on Jul 5, 2004 (gmt 0)

10+ Year Member



I recently replaced my <hr> with <div>using the following:

.hrnew { border-top: 1px solid #808080; width: 100%; }

This will, however, not display in Netscape 4.7. I was annoyed by the extra vertical space IE 6 added to the <hr>. I did not find a solution for this.

11:37 pm on Jul 5, 2004 (gmt 0)

10+ Year Member



I don't think you are doing anything wrong.
Netscape just doesn't know about the color attribute
for hr. As suggest above - use a graphic instead.
12:01 am on Jul 6, 2004 (gmt 0)

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Try this:

<hr size="1" width="80%" [b]style="color:#b4b4b4;background:#b4b4b4;"[/b] ALIGN="RIGHT" NOSHADE>

That will validate and should do the job.

Mozilla/Netscape 6.x and up use the background color rather than the foreground color to style the

hr
tag. Using the
color
attribute isn't valid (althogh the rest is if you're using a transitional doctype), but you can replace
color
by the CSS equivalent.

I feel that

hr
has it's place, although many don't like the fact that it is considered to be presentational rather than structural.
1:29 am on Jul 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For the record, I tried my own suggestion and it was black in Opera, no matter what color I set. I also tried background and still nothing.

I think, either the image, or the border solution would be the way to go.

Bm

3:38 am on Jul 6, 2004 (gmt 0)

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Thanks encyclo. I had the background color as transparent. Changing it to the same color now gives Firefox colored <HR>s, although not as deeply as IE. Guess I don't really care about NS4.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month