具有以下代码。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