具有以下代碼。CSS複選框+標籤下帶有ul/li的圖像
<div id="table">
<li>
<img id="img_friend_1" src="">
<input type="checkbox" value="1" id="form_friend_1" name="form[friend][]" />
<label for="form_friend_1" >My name</label>
</li>
</div>
我的CSS
#table{
display: table;
width:auto;
display: inline-block;
}
label {
display: inline-block;
}
input {
margin:0;
vertical-align: bottom;
position: relative;
}
現在我得到了這一點。文字旁邊是圖片。
[//複選框]我的名字
我要放置複選框與圖片下的標籤。圖片應該位於複選框和標籤的中間。
[//複選框]我的名字
其實CSS是很容易的,我實際上沒有與CSS的問題,但我stucked。我通過stackoverflow搜索並嘗試了很多CSS組合。
但隨後的圖像不是複選框和標籤上方居中。 – craphunter 2013-03-10 20:07:25
我添加了演示。 – dfsq 2013-03-10 20:15:30