* {margin: 0;padding: 0;}html, body {height: 100%;}
#wrapper {min-height: 100%;}* html #wrapper {height: 100%;}
* {margin: 0;padding: 0;}html, body {height: 100%;text-align: center;font: 12px/1.4 Verdana, sans-serif;background: #f00;}#wrapper {width: 770px;min-height: 100%;background: #ccc;margin: auto;text-align: left;}* html #wrapper {height: 100%;}
#out-content {padding-bottom: 50px;}#out-content:after { clear: both; display: block; font: 1px/0px serif; content: "."; height: 0; visibility: hidden;}* html #out-(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/webkaifa/)e type="text/css"/*![CDATA[*/* { margin: 0; padding: 0;}html, body { height: 100%; text-align: center; font: 12px/1.4 Verdana, sans-serif;}#wrapper { width: 100%; min-height: 100%; background: #ccc; margin: auto; text-align: left;}* html #wrapper { height: 100%;}#header { background: Green; height: 40px;}#out-content { padding-bottom: 50px;}#out-content:after { clear: both; display: block; font: 1px/0px serif; content: "."; height: 0; visibility: hidden;}* html #out-content { height: 1%;}#sidebar { float: left; background: Gray; margin-right: -200px; width:200px;}#content-box { float: right; width: 100%; background: Olive;}#content { margin-left: 200px;}#footer { height: 50px; background: Background; margin: -50px auto 0;}/*]]*//style/headbodydiv id="wrapper" div id="header"h3header/h3code#header {background: Green;height: 40px;}/code /div div id="out-content"div id="content-box" div id="content"h3content/h3code#content { float: right; width: 80%; background: Olive;} /code/div/divdiv id="sidebar" h3sidebar/h3 code#sidebar { float: left; width: 20%; background: Gray; }/code /div /div/divdiv id="footer" h3footer/h3 code#footer { height: 50px; background: Background; width:770px; margin: -50px auto 0; }/code /div/body/html
其他问题,如果有人希望中间两栏高度相同的话可以使用图片欺骗法,见 创建各栏同高的多栏布局。
OK,经过以上方法,这个布局应该是比较完美了。上一页 1 2 3 展开更多 (50%)分享猜你喜欢
下拉加载更多内容 ↓