Jump to content

Ie8 Negative Margin


Recommended Posts

I'm using a negative margin to put a horizontal menu over a banner image. In some versions of IE8 it doesn't want to be over the banner. It works in compat view though. I've used the developer tools and I have a better idea of what's happening.In compat view:compatview.jpgNot in compat view:above.jpgNot in compat, without the negative margin:belowc.jpgIt feels like a hasLayout problem... but I thought ie8 wasn't affected by that? I'd like to note that I'm using an xhtml transitional doctype... unfortunately...CSS

#topmenu{	height:20px;	position: relative;	padding:0 7px 0 7px;	margin:0;	margin-top:-22px;	float:right;	background-color:#000097;	color:#fff;	font-family: Tahoma,Arial,sans-serif;}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...