这是我的CSS代码:为什么在ie中,右侧是绝对定位的标志?
#header {
width: 900px;
margin-left: 0;
position: relative;
text-align: left;
clear: left;
float: left;
}
#logo {
z-index:-1;
position:absolute;
}
和HTML ...
<div style="text-align: center;">
<div id="wrapper">
<div id="header">
<!--Logo-->
<div id="logo"> <a href="http://projectstratos.com/" title="Home"><img src="logo-transparent.png" border="0"></a>
</div>
<!--End Logo-->
</div>
</div>
</div>
该标志需要保持绝对的,在我的内容。在Firefox中它看起来不错,但是在标志是在右边而不是在左边。我正在使用中心div,而不是使用居中保证金方法,因为它不起作用!
如何将它移动到左侧?
哪个版本的IE?您的代码适用于Chrome和IE8。 http://jsfiddle.net/mattball/uhBMR/ – 2011-02-02 18:03:38
你不能只用`left:0`吗? – Marnix 2011-02-02 18:05:00