【问题标题】:CSS - absolute positioning and fluid divsCSS - 绝对定位和流体 div
【发布时间】:2011-04-30 23:43:03
【问题描述】:

我需要制作一个如下所示的布局:

[250px - fixed div]  [fluid div, must expand depending on the width of the body and the 2 divs next/before it]  [250px - fixed div]

这可能吗? 所有 3 个 div 的容器也是流动的(100% 宽度)。 所有这些 div 都包含背景图像(左 + 右 + 重复中心图像)并且应该留在后面。

【问题讨论】:

  • 当然有可能,谷歌搜索“css 3 column layouts”或不同的关键字,已经有很多例子了!

标签: css html width css-position


【解决方案1】:

我建议阅读The Holy Grail 以获得完整的教程演练和必要的浏览器黑客描述以及创建布局等。

此外,我建议您考虑在包含元素或流体 div 上放置一个最大宽度(例如:#container {max-width:1024px;}),因为在极高的分辨率/大屏幕上,拉伸 div 会变得令人讨厌大到让用户感到沮丧。

【讨论】:

    猜你喜欢
    • 2012-09-05
    • 1970-01-01
    • 2011-09-07
    • 1970-01-01
    • 2011-06-27
    • 2010-12-30
    • 1970-01-01
    • 2013-06-04
    • 1970-01-01
    相关资源
    最近更新 更多