我有这样的代码:
<form method="post" id="sc_form">
<div class="radio-group">
<input type="radio" name="phone" id="send" value="send"></input>
<label for="send">Вы отправитель</label>
</div>
<div class="radio-group">
<input type="radio" name="phone" id="get" value="get"></input>
<label for="get">Вы получатель</label>
</div>
<input type="submit" name="send" value="Отправить" id="send-button" />
</form>css:
#get, #send{
border: none;
width: auto;
height: auto;
display: inline;
}
.radio-group{
text-align: left;
margin: 0 10px 6px 10px;
font-family: Arial,Helvetica,Garuda,sans-serif;
font-size: 11px;
}
input[type='radio'], label{
vertical-align: baseline;
}我想在同一条线上设置收音机并贴上标签,这样它们就会看起来很漂亮,并且垂直地居中。
http://jsfiddle.net/Zn93w/
整页和css:http://jsfiddle.net/2yZTK/
发布于 2013-11-16 14:28:38
这对我来说很有用
input[type='radio']{
margin:0;
}
input[type='radio'], label{
display:inline;
vertical-align:top;
}Удачи)
发布于 2013-11-16 14:15:43
像这样?http://jsfiddle.net/Driveash/Zn93w/1/
我在.类中增加了行高,并通过输入和标签更改了垂直对齐。
.radio-group{
text-align: left;
margin: 0 10px 6px 10px;
font-family: Arial,Helvetica,Garuda,sans-serif;
font-size: 11px;
line-height:11px;
}
input[type='radio'], label{
vertical-align: bottom;
margin: 0; //for the whole site.
}https://stackoverflow.com/questions/20019399
复制相似问题