HTML CSS examples for CSS Layout:Layout
Changing the order of columns in a responsive 3-column layout
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .wrapper {<!--from w w w. jav a 2s . c o m--> width:100%; overflow:hidden; } .one { float:left; background:red; width:23%; height:100px; } .two { float:right; background:blue; width:57%; height:100px; } .three { float:right; background:green; width:23%; height:100px; } @media only screen and (max-width: 300px) { .one { width:51% } .two { width:100% } .three { width:51% } } </style> </head> <body> <div class="wrapper"> <div class="one"></div> <div class="three"></div> <div class="two"></div> </div> </body> </html>