以下为CSS文件内容,文件名为1.css
body { font: 100% 宋体, Arial, Helvetica, sans-serif; background: #666666; margin: 0px; padding: 0px; text-align: center; } #container { width: 780px; background: #FFFFFF; margin: 0px auto; padding: 0px; border: 0px; } #header { background: #DDDDDD; padding: 0px; margin:0px; width:100%; } #contentContainer { width: 100%; background: #FFFF00; padding:0px; margin:0px; overflow:hidden; } #contentLeft { background: #ff0000; float:left; padding: 0px; margin:0px; width:200px; padding-bottom:100000px; margin-bottom:-100000px; } #contentRight { background: #0000ff; float:left; padding: 0px; margin:0px; width:200px; padding-bottom:100000px; margin-bottom:-100000px; } #content { background: #00ff00; padding: 0px; margin:0px auto; width:380px; float:left; } #footer { clear:left; background: #DDDDDD; padding: 0px; margin:0px; width:100%; }
以下是HTML页面
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>test</title> <link type="text/css" rel="stylesheet" href="1.css" mce_href="1.css" /> <mce:script type="text/javascript"></mce:script> </head> <body> <div id="container"> <div id="header"> 标题 </div> <div id="contentContainer"> <div id="contentLeft"> left </div> <div id="content"> content <br /> asf <br /> sdfsa <br /> safs </div> <div id="contentRight"> right </div> </div> <div id="footer"> 脚注 </div> </div> </body> </html>