我有以下HTML:
<div id="sah_padding">
<div id="sah_holder">
<div id="sah_name">Hello [agent_name]</div>
<div id="sah_logout"><a href="#" id="logout_link" title="Logout">✖</a></div>
</div>
You are working with [customer_name]
</div>
,我有以下的CSS:
#sah_padding{
padding:10px 10px 10px 10px;
}
#sah_holder{
padding-bottom:10px;
clear:both;
}
#sah_name{
float:left;
width:50%;
}
#sah_logout{
text-align:right;
}
#logout_link{
color:#fff;
text-decoration:none;
font-weight:bold;
}
但是我的登錄鏈接和Hello消息不正確對齊,註銷鏈接在hello消息下面幾個像素,我需要它們在同一水平線上。我究竟做錯了什麼?
您需要使用正確對齊的位置 – 2012-03-29 09:24:34
http://jsfiddle.net/EfFLb/對我來說看起來不錯..:o – 2012-03-29 09:27:33