简体   繁体   中英

Form elements are not properly aligned in firefox

Please have a look at this test: http://jsfiddle.net/mqvL8/

If I use Chrome or Safari, everything is aligned properly

Chrome的例子

If I do the same thing in Firefox, it looks like this:

Firefox的示例

Any idea why the difference?

I am using div's like this:

<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. Am I doing something wrong?

Do a clear:both on form-group

.form-group {
    clear:both;
}

Updated JSFiddle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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