| 4:26 am on Aug 18, 2009 (gmt 0)|
Isn't IE simply special? Try setting the font-size...for some reason that comes to mind.
| 5:12 am on Aug 18, 2009 (gmt 0)|
hmm, what do I set it to?
If you want to see how it looks, try this:
border:1px solid gray;
<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>
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...
| 5:28 am on Aug 18, 2009 (gmt 0)|
You were right!
<div style="margin:1px 0; background:#eee;font-size: 1px; height:1px;"></div>
That works :) Thanks a lot.
| 10:48 am on Aug 18, 2009 (gmt 0)|
Why not use the html element that's intended to be a separator instead of abusing an empty div ?
Yes you can style them too.
| 6:44 am on Aug 25, 2009 (gmt 0)|
Swa66, vikasvrao's goal is to implement a purely CSS solution to fix the problem. Unnecessary (X)HTML works against SEO, in other words the less code/more content the better! ;)
| 6:46 am on Aug 25, 2009 (gmt 0)|
vikasvrao, I forgot to mention, be sure to implement IE specific fixes in conditional comment style sheets. You don't want to end up looking at that code and removing it only to later see IE rendering as a mess.
| 7:05 am on Aug 25, 2009 (gmt 0)|
I have to agree with swa66 on this one. <hr> is your rule element...and using it as such will IMPROVE both code AND css.
| 9:39 am on Aug 25, 2009 (gmt 0)|
I know and appreciate effort to just use CSS and not being allowed/able to change the (x)html.
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.
| 12:01 am on Aug 26, 2009 (gmt 0)|
Give it a class, there are exceptionally few if any instances where inline styling is necessary.
| 12:55 am on Aug 26, 2009 (gmt 0)|
|<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>.