HTML CSS examples for CSS Layout:2 Column
position two divs next to each that expand to the size available without wrapping
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <!-- ww w. j a v a2s .co m--> <body> <style> div.outerDiv { border:2px solid Chartreuse; height:301px; } div.innerPadding { padding:6px; } div.innerDivA-container, div.innerDivB-container { float:left; width:51%; } div.innerDivA-content, div.innerDivB-content { border:2px solid yellow; margin:6px; } </style> <div class="outerDiv"> <div class="innerPadding"> <div class="innerDivA-container"> <div class="innerDivA-content"> Lorem ipsum </div> </div> <div class="innerDivB-container"> <div class="innerDivB-content"> Lorem ipsum </div> </div> </div> </div> </body> </html>