Lorraine Bernard
Lorraine Bernard

Reputation: 13400

How to display on the same line label and div in the following context

How to display on the same line label and div in the context of bootstrap. I did try the following code but it does not work:

.control-group​ {
    display: inline-block;
}​

demo: http://jsfiddle.net/hU6Kz/1028/

P.S.: I would like just to change the css rule not the dom

Upvotes: 1

Views: 6417

Answers (3)

Selvamani
Selvamani

Reputation: 7684

They have another one option. Use this code

.control-label {
float:left;
}

Demo: fiddle

Upvotes: 3

Muthu Kumaran
Muthu Kumaran

Reputation: 17910

.control-group is parent div and you have child div.controls which need to set inline-block to show in one single line.

Try this CSS,

.controls {
    display: inline-block;
}​

http://jsfiddle.net/muthkum/hU6Kz/1030/

Upvotes: 1

Rohit Azad Malik
Rohit Azad Malik

Reputation: 32182

Hi now add display inline-block in your .controls div

as like this

.control-group , .controls{
    display: inline-block;
}

Live demo

Upvotes: 2

Related Questions