Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem with IE position: absolute

Tags:

html

css

I have this code it works quite well in Firefox; but shoots to the right on Explorer. Is there anything wrong with this code that I can't see?

Your help is appreciated

<div style="position: absolute; top: 170px"><a href="http://www.mysite.com"><img src="images/sponsor.png" /></a></div>

What I'm expecting is for the image to show on top of the main header image- which works alright on Firefox, but moves to the far right in IE causing the site to break. Not sure why this is happening.

like image 205
Julie Avatar asked Sep 21 '11 12:09

Julie


1 Answers

Add left: 0px; as well, IE probably won't give it such default value:

<div style="position: absolute; top: 170px; left: 0px;">
like image 189
Shadow Wizard Hates Omicron Avatar answered Nov 08 '22 22:11

Shadow Wizard Hates Omicron