复(单)选框与文字对齐问题

一般情况下, 文字大小为14px;则在浏览器中对齐良好;

若文字大小为12px;则出现文字与复选框或者单选框不对齐现象:

  不在同一条线上

解决办法:

1)、在单选框或者复选框上设置:vertical-align: text-bottom;margin-bottom: 2px;*margin-bottom: -2px;

2)、在单选或者复选框元素上设置:vertical-align:middle; margin-top:-2px; margin-bottom:1px;

 

posted on 2018-10-16 15:55  婧星  阅读(288)  评论(0编辑  收藏  举报

导航