我有一种情况,我有一个宽度为 840 像素的包装 div。
现在,在该 div 中,我放置了一个不那么重要的装饰元素 (#dekoschrift),它与包装 div 重叠。我不希望从该元素触发水平滚动条。
大致情况如下:
<div class="centerer">
<div id="wrapper">
<div id="dekoschrift"></div>
</div>
</div>
的CSS:
.centerer { position: relative; width: 830px; margin: 0 auto; height: 100%; }
#wrapper { position: relative; float: left; width: 100%; height: 100%; }
#dekoschrift {
background: url(/images/layout/Variaton_Typogrund.png) no-repeat 0 0 transparent;
width: 238px; height: 524px;
position: absolute; top: 280px; left: 845px; z-index: 0;
}
这有可能吗?
我试图将“溢出:隐藏”设置为包装器 div,但这显然是图形。而且我不能在 body 上使用“overflow-x:hidden”,因为这会导致无法在小屏幕上滚动。
这是实际页面的链接:www.variaton.ch
任何帮助表示赞赏!
也许有一些我不知道的秘密“显示:秘密”参数?!
干杯
斯特凡