HTML CSS examples for CSS Layout:Responsive Layout
Adjust css style according to wrap state
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .container {<!--from w ww . j a v a 2 s .c om--> float:left; width:51%; } .container>div { padding:11px; margin:11px; color:Chartreuse; } .first { background-color:yellow; } .second { background-color:blue; } @media screen and (max-width: 1000px) { .container { clear:both; width:100%; } } </style> </head> <body> <div class="container"> <div class="first"> Left </div> </div> <div class="container"> <div class="second"> Right </div> </div> </body> </html>