我有HTML這樣的:CSS:裕IMG
<div id="userBar">
<a href="notifications.php" class="iconGlobe"></A>
<a href="cp.php" class="iconCP"></a>
<a href="cap.php" class="iconCAP"></a>
</div>
.iconGlobe是看起來像這樣一個圖標,同時與redst:
.iconGlobe{
background: url(../images/icons/globe_16x16.png) no-repeat;
width: 16px;
height: 16px;
border: none;
display:inline-block;
position:relative;
text-decoration:none;
}
我試着去之間給保證金錨鏈接,如下所示:
#userbar a{
margin-right: 8px;
}
但我不適用保證金。我試圖單獨這樣做.iconGlobe有保證金的權利,而且工作得很好。我不希望單獨應用它們。
我不認爲你需要`position:relative;`on .iconGlobe。你在測試哪個瀏覽器?你有沒有現場的例子? – Kyle 2011-01-14 09:56:40