简体   繁体   English

Firefox中的表单元素未正确对齐

[英]Form elements are not properly aligned in firefox

Please have a look at this test: http://jsfiddle.net/mqvL8/ 请看一下这个测试: http : //jsfiddle.net/mqvL8/

If I use Chrome or Safari, everything is aligned properly 如果我使用的是Chrome或Safari,那么一切都将正确对齐

Chrome的例子

If I do the same thing in Firefox, it looks like this: 如果我在Firefox中做同样的事情,它看起来像这样:

Firefox的示例

Any idea why the difference? 知道为什么会有区别吗?

I am using div's like this: 我正在使用div这样的:

<div class="form-group">
        <span class="control-label col-xs-2"><b>Name</b></span>
</div>

Each of the titles has a CSS class of col-xs-2 of which I would assume will make everything properly aligned like Chrome and Safari do. 每个标题都有一个CSS类col-xs-2 ,我认为它将像Chrome和Safari一样使所有内容正确对齐。 Am I doing something wrong? 难道我做错了什么?

Do a clear:both on form-group clear:both在表单组上

.form-group {
    clear:both;
}

Updated JSFiddle 更新了JSFiddle

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM