Julie Julie - 1 year ago 79
CSS Question

Problem with IE position: absolute

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.

Answer Source

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

<div style="position: absolute; top: 170px; left: 0px;">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download