我有这样的导航CSS文本位置IE/FF问题
<div class="cookieBar">
<div class="light first">
<a href="#" class="ckLnk">Home</a>
</div>
<div class="dark">
<img src="images/cnavR1.png" class="pointE" /><a href="#9" class="ckLnk">Cars</a>
</div>
<div class="light">
<img src="images/cnavR2.png" class="pointE" /><a href="#11" class="ckLnk">Ferrari</a>
</div>
<div class="dark">
<img src="images/cnavR1.png" class="pointE" /><a href="#18" class="ckLnk">Broken Ones</a>
</div>
<div class="light">
<img src="images/cnavR2.png" class="pointE" /><a href="#23" class="ckLnk">No Windows</a>
</div>
<img src="images/cnavR1.png" class="pointE" />
<div style="clear:both">
</div>
</div>
随着CSS:
/* Cookie navigation trail */
.cookieBar
{
background-color: #D8DFE3;
height: 26px;
width: 100%;
margin-bottom: 12px;
}
.light
{
background-color:#0F6B93;
height: 26px;
float:left;
}
.dark
{
background-color:#0E3B52;
height: 26px;
float:left;
}
.first
{
padding-left: 10px;
}
.ckLnk
{
color: #ffffff;
font-size: 11px;
font-weight: bold;
font-family: Arial;
text-decoration: none;
}
.ckLnk:hover
{
text-decoration: underline;
}
.pointE
{
float:left;
padding-right:10px;
}
我需要的锚链接来定位几个像素较低,所以它在盒子的中心。当我做position:relative;top:5px
;它在FF中工作正常,但在IE中它有相当多的PX关闭。我似乎无法让它在两个浏览器中匹配!
任何提示? IE需要顶部:8px;和FF需要顶部:4px;因为它看起来是正确的。
超级!我<3岁。 – 2010-09-10 10:22:28