atian25
atian25

Reputation: 4256

Bootstrap: form in navbar

I'm using bootstrap2.1, and got some problem:

  1. the label's vertical-align is not right, see http://jsfiddle.net/atian25/UGjW6/1/embedded/result/
  2. how to pull some form element left , some to right?
  3. how to add a divider-vertical in nav-form?

Is these any step I miss? could u plz show me the correct jsfiddle?

Upvotes: 0

Views: 4129

Answers (1)

ditscheri
ditscheri

Reputation: 579

I added some markup to your code, maybe this is what you were looking for: http://jsfiddle.net/UGjW6/31/

I'm using the classes .pull-left and .pull-right as well as .divider-vertical.

For some reason, labels within a .navbar-form didn't get the margin-top of 5px as it is applied to the following:

.navbar-form input, .navbar-form select, .navbar-form .radio, .navbar-form .checkbox

Might be a bug, but I'm not sure about that. Anyway, applying the .checkbox class to your labels did the trick.

You might as well add this to your css:

.navbar-form label { margin-top: 5px; }

Upvotes: 2

Related Questions