Given this HTML:
<div>foo</div><div>bar</div><div>baz</div>
How do you make them display inline like this:
foo bar baz
not like this:
foo
bar
baz
Given this HTML:
<div>foo</div><div>bar</div><div>baz</div>
How do you make them display inline like this:
foo bar baz
not like this:
foo
bar
baz
As mentioned, display:inline is probably what you want. Some browsers also support inline-blocks.
http://www.quirksmode.org/css/display.html#inlineblock
ok, for me :
An inline div is a freak of the web & should be beaten until it becomes a span (at least 9 times out of 10)...
...answers the original question...
I think you can use this way without using any css -
Just use a wrapper div with "float: left" and put boxes inside also containing float: left:
CSS:
HTML: