html css 结构化容器
please see the test page on www.derekho.co.uk
I'm wanting to 'empty' the container labelled with 'D' so that the body background tiles show through.
Container D needs a set width and needs to be centered. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由提问者解决:
我建议使用浮动而不是绝对定位。使用绝对定位,在整个结构的顶部和底部添加内容时会遇到麻烦。例如,如果您添加页脚并且侧栏比中心栏大,则页脚将位于这些栏下方,它们将覆盖它!使用浮动,您可以避免页脚元素的此设置
clear: Both;
。浮动示例:
As solved by asker:
I suggest to use floats instead of absolute positioning. With absolute positioning you will have troubles when adding content on top and at bottom of the whole structure. For example, if you add a footer and side columns are bigger than the center one, footer will be positioned under these columns, they will cover it! Using floats, you can avoid this setting
clear: both;
for the footer element.Float example: