html - 尽管应用了 CSS 代码,复选框仍未对齐

标签 html css

我试图让我的复选框和标签对齐(分成两列),但它不起作用。知道我可以做些什么来修复它吗?

Jsfiddle 在这里:http://jsfiddle.net/wfju61oq/1/

.option label {
    display: block;
    padding-left: 15px;
    text-indent: -15px;
}
.option input {
    width: 13px;
    height: 13px;
    padding: 0;
    margin:0;
    vertical-align: bottom;
    position: relative;
    top: -1px;
    *overflow: hidden;
}

最佳答案

试试这个:

.option label {
    display: block;
    width: 220px;
}
.option input {
  float:right;
}

工作 fiddle here .

关于html - 尽管应用了 CSS 代码,复选框仍未对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26701904/

相关文章:

html - CSS如何在没有导航缩放的情况下缩放站点

html - 根据浏览器窗口调整、缩放和居中图像 (CSS)

css - Bootstrap 导航中的动画 CSS 渐变

电子邮件通讯的 HTML 表格问题

html - 手机模式网页菜单侵占他人div

html - 资源在 Google Chrome 网络选项卡中显示待处理和来自缓存

javascript - 最大高度变化的 CSS 动画

html - 33% + 33% + 34% 与 iOS 上的 100% 宽度不同

html - 如何解决 IE 中的渲染性能问题

javascript - 无法根据另一个元素是否有内容来显示或隐藏按钮