Forum Moderators: not2easy
<div style="margin:1px 0; background:#eee; height:1px;"></div>
While this looks as expected in firefox, safari and IE 7 and 8 but looks like very different, rectangular(height should be 1px, but looks more like 5?), and I'm not sure why.
Please help!
Thanks!
If you want to see how it looks, try this:
<html>
<head>
<style type="text/css">
div.container
{
width:100%;
margin:0px;
border:1px solid gray;
line-height:150%;
}
</style>
</head>
<body>
<div class="container">
<div class="content">
<h2>Free Web Building Tutorials</h2>
<div style="margin:1px 0; background:#eee; height:1px;"></div>
<p>At W3Schools you will find all the Web-building tutorials you need,
from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP.</p>
<p>W3Schools - The Largest Web Developers Site On The Net!</p></div>
</div>
</body>
</html>
See the line seperator after the line "Free Web Building Tutorials" and if you can look at it in IE 6, you will see how different it looks...
But not being able to change the html isn't the case here as the OP is using inline CSS.
I'm by far not a SEO specialist, but if you seek to have a better content/size ratio, it seems "<hr>" is _far_ shorter than "<div style="margin:1px 0; background:#eee;font-size: 1px; height:1px;"></div> " and then style it from a stylesheet. Even using a stylesheet with a "<hr>" is still a serious factor shorter than "<div class="xyz"></div>" ... and it has the semantics of <hr> fully on it's side.
<div style="margin:1px 0; background:#eee; height:1px;"></div>
I agree that what is being described fits purpose of the <hr />. it's purpose is to 'buffer' content. "The amount of vertical space inserted between a rule and the content that surrounds it..."
Don't see how a <hr /> would impact SEO at all, certainly not worse than a 'junk' <div>.