HTML CSS examples for CSS Widget:Div
Put a div inside a div that is responsive
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .outer {<!-- w w w .j a v a 2 s .co m--> border:2px solid Chartreuse; } .inner-top { float:center; text-align:center; width:100%; position:relative; } .inner-left { border:2px solid yellow; text-align:center; width:50%; float:left; } .inner-right { border:2px solid blue; text-align:center; width:50%; float:left; } </style> </head> <body> <div class="outer"> <div class="inner-top"> <div class="inner-left"> <p>Lorem ipsum </p> </div> <div class="inner-right"> <p>Lorem ipsum d</p> </div> </div> </div> </body> </html>