How to do horizontal division using html div and css tag

I am trying to make two horizontal divisons using the <div> in html, but I could not do it. Can someone help me do horizontal division using html and css with <div> tags?

This is prototype

+7
source share
3 answers

Set the float property for each div to match, for example, left , to each of them, so that each of them is large enough so that the parent element contains them.

Demo

+3
source
 <div id="firstDivistion" class="division"></div> <div id="secondDivistion" class="division"></div> .division{ width:50%; height:100px; float:left; } 
+5
source
 `<div style='float:left'>stuffs</div> <div style='float:right'>stuffs</div> <div style='clear:both'></div>` 

Works well in every case and is respected in many places ...

+4
source

All Articles