下面是将页面设计为固定宽度布局的 CSS 代码。 以下为引用的内容: body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px; } h2,h3 { margin-top: 0px; padding-top: 0px; } div#head { position: absolute; width:750px; height:100px; left:0px; top: 0px; background-color: #FFFF66; } div#columns { position: relative; width: 750px; top: 100px; background-color: #CCCCCC; } div#side1 { position:absolute; width:150px; top: 0px; left:0px; background-color: #FF6666; } div#content { position: relative; width: 450px; top: 0px; left: 150px; background-color: #999999; } div#side2 { position:absolute; width:150px; top: 0px; left: 600px; background-color: #00FF66; } div#foot { position: relative; width: 750px; clear: both; margin-top: 100px; background-color: #99FFFF; } | |