DavSev
DavSev

Reputation: 1111

CSS bootstrap elements not aligning horizontal well

I have a form with Bootstrap CSS.

The CSS is left-to-right but I need the form fields to be right-to-left. So I added a class that contains float: right to each of the forms.

All the fields are supposed to float one next to each other, but the problem is that some of the lines break in the middle, as can be seen in the image below.

I have searched and couldn't find what is causing the line to break.

Upvotes: 0

Views: 38

Answers (2)

Mehrdad Fabi
Mehrdad Fabi

Reputation: 36

Use a parent element with class "row" for the set of input elements that you want to be in one line.

Upvotes: 2

Krzysztof Mazur
Krzysztof Mazur

Reputation: 608

You set class - "col-md-4" so, line is divided into 3 elements with 33% of width. If u want 4 elements in line u have to set "col-md-3", then u will have 12/3 = 4, 4 elements with 25% width :)

Upvotes: 0

Related Questions