+ 4
Please help me with div boxes
How to display two <div> boxes inline in CSS?
3 Answers
+ 2
@Varun Moghe:
Your answer is ugly... not false, but not the better way, and almost unreadable as is ( hardly but possible for experimented people, but quitely impossible for a beginner :P ). You should indent your code ( edit: and break lines, obviously ), mainly if this is to be read by others ^^
@Samuel Sur:
As suggested by @Robin Deckert, for give the layout placement behaviour of a <span> ( inline ) element to a <div> ( block ) one, you need to set the css property 'display' of your <div> to an inlined type value ( 'inline', 'inline-block' ).
+ 1
why don't you use the <span> tag
0
<style type="text/css"> div.inline { float:left; } .clearBoth { clear:both; } </style> <div class="inline">1<br />2<br />3</div> <div class="inline">1<br />2<br />3</div> <div class="inline">1<br />2<br />3</div> <br class="clearBoth" />