标签:style blog http color io ar for sp div
<html> <head> <style type="text/css"> html, body { height: 100%; margin: 0px; } /* this is the big trick*/ #wrapper:before { content:‘‘; float: left; height: 100%; } #wrapper { height: 100%; background-color: black; color: white; } #header { background-color:#000; } #content { background-color: grey; } /* this is the big trick*/ #content:after { content:‘‘; display: block; clear: both; } </style> </head> <body> <div id="wrapper"> <div id="header"> Title here </div> <div id="content">Some content</div> </div> </body> </html>
转自:
Set div to fill in the rest of the height dynamically?
标签:style blog http color io ar for sp div
原文地址:http://www.cnblogs.com/kanputer/p/4035676.html