Reputation: 11498
How can I achieve this?
<div id="check > <div>hello</div> x3 <div> jello</div> y3 </div>
I was expecting css like following to place all item horizontal.
#check {display:inline;}
But I get something like this:
hello
x3
jello
y3
I want something like:hello x3 jello y3
What am I missing here?
Upvotes: 1
Views: 49
Reputation: 3729
You should use it for divs inside the container
#check div {display: inline;}
Upvotes: 1
Reputation: 2304
You have to apply the inline
style to all of the divs you want on the same line.
Spans might be better suited to your purpose since that's what divs and spans are for. See here: http://jsfiddle.net/Q3Dtj/
Upvotes: 3