Reputation: 3808
I want this :
But I get this :
Using this to style the containing div :
.option {
display:inline-block;
width:100%;
white-space:nowrap;
overflow:hidden;
margin:10%;
}
The rest is nothing here : http://jsfiddle.net/n2LtN/
What is missing?
Upvotes: 1
Views: 3850
Reputation: 9105
I fixed it by using display:inline-block
instead of display:inline
, without floating
:
span, input[type="checkbox"] {
display:inline-block;
*display:inline; /*That's for IE*/
*zoom:1; /*That's for IE*/
width:auto;
}
See the working fiddle.
Upvotes: 1
Reputation: 18811
Remove float:left
from span, input[type="checkbox"]
You should read up on how float works.
Upvotes: 0