IE and space above elements

Posted by & filed under .

There’s a good chance that you’ve probably seen this before and weren’t able to come up with a solution and ripped your hair out trying to get it and maybe that’s what you were about to do before you stumbled on this. I was shown this by a coworker this morning and I decided to add it to my ever growing list of reasons why IE6/IE7 reminds me of a mother-in-law with it’s horrific ability to nag for details. (Not my case, my mother-in-law doesn’t care about anything)

So! Actually there are 2 things I’ve seen that work :

1. Remove the margin-top from the element (especially things like headers and put padding or line-height instead)

2. (from coworker) set your element to have vertical-align:top and suddenly it disappears!

Hope that helped someone. If not, well I guess I’ll keep looking.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>