IE位置的问题:绝对 [英] Problem with IE position: absolute

查看:104
本文介绍了IE位置的问题:绝对的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个代码它在Firefox中工作得很好;但在资源管理器上向右侧射击。

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?

您的帮助非常感谢

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

我期望的是图像显示在主标题图像的顶部在Firefox上,但移动到最右边的IE,导致网站断裂。

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.

推荐答案

添加 left:0px; 以及,IE可能不会给它这样的默认值:

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

<div style="position: absolute; top: 170px; left: 0px;">

这篇关于IE位置的问题:绝对的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆