使 3 列固定宽度跨浏览器兼容、可访问、语义正确的布局的最佳方法是什么?
<div id="wrapper">
<div id="header">
This is the Header
</div>
<div id="top-nav">
Top Navigation
</div>
<div id="leftcolumn">
Left Column
</div>
<div id="content">
content column
</div>
<div id="rightcolumn">
Right Column
</div>
<div id="footer">
This is the Footer
</div>
</div>
#wrapper {width:970px;margin:0 auto }
#header {height:100px }
#top-nav {height:30px}
#leftcolumn { }
#content { }
#rightcolumn { }
#footer {height:100px}
有了这个 XHTML 代码,应该编写什么 css 来制作这个 3 col 布局。
- 跨浏览器兼容,包括 IE6(没有 CSS hack 或 IE 的额外条件 css)
- 以 Px 为单位的宽度
- 居中
- 在 em 中调整字体大小
- 列数可以扩展或移除 1-4,5 等
- 启用 SEO