Margin-top not working in ie

Hi Guys,

Can’t work out why this is happening. I have a margin-top:30px specified on my ‘intro’ div, which is working fine in Firefox and Safari, but for Internet Explorer it doesn’t seem to show. The url is here:

http://benredpath.co.uk/test/

Any help greatly appreciated!

It’s an IE8 specific bug, with margin collapsing for the first element after floated elements and clearing <div>s.

You should move the div class=“clear” inside div id=“top-bar” to fix it.


<LI class="page_item page-item-2"><A title=ABOUT href="http://benredpath.co.uk/test/about/">ABOUT</A></LI></UL></DIV>[COLOR="Blue"]<DIV class=clear></DIV>[/COLOR]</DIV><!--end top-bar-->
<DIV id=intro>

Hey noonnope, thanks for your quick response.

That fixes it in IE but in firefox the whole div ‘top-bar’ gets pulled down from the top of the viewport…any idea why this might be?

Use this:

#top-bar {
    overflow: hidden;
}

Awesome, thanks so much for your help! :slight_smile:

No problem. :slight_smile: You’re welcome.