HTML CSS examples for CSS Layout:Responsive Layout
Making a footer with small div boxes inside of it responsive to the size of the browser window
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #footer {<!--from w w w . j a va2 s . c o m--> width:100%; clear:both; } #footer .outer { width:calc(100% / 5 - 5px); text-align:center; display:inline-block; margin:0px; border:0px; } #footer .inner { border:6px outset Chartreuse; width:100px; height:100px; display:inline-block; } </style> </head> <body> <div id="footer"> <div id="fbox1" class="outer"> <div class="inner"> Lorem </div> </div> <div id="fbox2" class="outer"> <div class="inner"> Lorem </div> </div> <div id="fbox3" class="outer"> <div class="inner"> Lorem </div> </div> <div id="fbox4" class="outer"> <div class="inner"> Lorem </div> </div> <div> </div> </div> </body> </html>