homepage Welcome to WebmasterWorld Guest from 54.196.159.11
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
HR not validating for any Netscape
Problem getting hr color to validate
mfmikeb




msg:602411
 7:47 pm on Jul 5, 2004 (gmt 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

 

Birdman




msg:602412
 7:52 pm on Jul 5, 2004 (gmt 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 :)

keyplyr




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

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.

tedster




msg:602414
 9:44 pm on Jul 5, 2004 (gmt 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.

bull




msg:602415
 10:31 pm on Jul 5, 2004 (gmt 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




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

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.

encyclo




msg:602417
 12:01 am on Jul 6, 2004 (gmt 0)

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.

Birdman




msg:602418
 1:29 am on Jul 6, 2004 (gmt 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

keyplyr




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved