文字未与相应的复选框对齐 [英] text not aligned with corresponding checkbox

查看:46
本文介绍了文字未与相应的复选框对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<div ng-repeat="option in LgODDL track by $index">
    <label> 
        <input type="checkbox" ng-model="selected[$index]" ng-click="toggleOrderSelection(option.Number, option.NumberDetails)">  {{option.NumberDetails}}
    </label>
</div>

我认为这是我唯一可能影响此效果的CSS:

I think this is my only css that could be affecting this:

input {
    line-height: normal;
    height: 22px;
    white-space: nowrap;
}

谁能告诉我为什么上面的代码生成的文本与复选框不均匀对齐?

Can anyone tell me why the above code generates text not evenly aligned with the checkbox?

推荐答案

将以下样式添加到您的< input> 标记中:

Add the following styling to your <input> tag:

.checkbox-align {
  padding-top: 7px;
  margin-bottom: 0;
  vertical-align: middle;
}

这篇关于文字未与相应的复选框对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆