Forum Moderators: not2easy
#blank {width:770px; height:7px; background:#000000 url("/images/layout/horizontal.gif") top left;}
<hr id="blank" />
That's what it's there for. I've tested it in both Firefox 2, Konqueror 3.5.6, Opera 9.1, Amaya 8.53, and IE 5.0, 5.5, and 6.0, and it works fine, so it should also work in Safari and IE7. Two possible advantage of <hr /> are that it will also work in text browsers (though only as a plain line) and screen readers (I'm guessing about screen readers).
I'll lay odds your element has some inherent padding that is preventing the collapse.
mep00’s post is probably a better idea but be warned that IE has some inconsistencies when rendering <hr>s. I’ve had problems removing the inset borders before without using the non-standard noshade attribute. Usually these days I actually put an <hr> inside a classed <div> then hide the <hr> using CSS (usually the off-left method of position:absolute;left:-9999px;).
[edited by: Robin_reala at 7:09 am (utc) on Jan. 25, 2007]
I noticed that you didn't specify margin or padding in your CSS. I assumed that it was defined elsewhere. Now that I think about it, I don't think IE6 understands the *, and people use it to hack.
This should work:
div#blank {margin:0; padding:0; width:770px; height:7px; background:#000000 url(/images/layout/horizontal.gif) top left;}
Don't use quotes in a CSS URI. IE hates 'em.