HTML CSS examples for CSS Layout:Layout
Auto-height, paneled layout in CSS
<html> <head> <meta name="viewport" content="width=device-width"> <style> .top { height:100px; background:red; text-align:center; } .bottom { height:100px; background:green; text-align:center; } .middle {<!--from w w w . ja v a 2 s . co m--> height:calc(100vh - 221px); background:yellow; text-align:center; } </style> </head> <body> <div> <div class="top"> Lorem ipsum do </div> <div class="middle"> Lorem ipsum d </div> <div class="bottom"> Lorem ipsum do </div> </div> </body> </html>