Welcome to WebmasterWorld Guest from 54.160.177.33

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)

New User

10+ Year Member

joined:June 24, 2004
posts:31
votes: 0


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 July 5, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 22, 2002
posts:2546
votes: 0


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 July 5, 2004 (gmt 0)

Senior Member from US 

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

joined:Sept 26, 2001
posts:5808
votes: 64


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 July 5, 2004 (gmt 0)

Senior Member

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

joined:May 26, 2000
posts:37301
votes: 0


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 July 5, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:June 3, 2002
posts:566
votes: 0


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.

jugjimcos

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

Inactive Member
Account Expired

 
 


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 July 6, 2004 (gmt 0)

Senior Member from CA 

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

joined:Aug 31, 2003
posts:9063
votes: 2


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 July 6, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 22, 2002
posts:2546
votes: 0


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 July 6, 2004 (gmt 0)

Senior Member from US 

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

joined:Sept 26, 2001
posts:5808
votes: 64


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.