2010-04-07 111 views
4

我遇到溢出问题:隐藏在我的情况下不工作。CSS溢出:隐藏;不起作用

我有一个div id = ticker,它基本上像一个滚动报价器一样工作。所以我在前面加上动态内容DIV ID =股票

的DIV ID =股票被包含在其中包含在另一个DIV另一个div基本上认为它像4-5级树状结构

体 - > div [id = wrapper] - > div [class = main] - > div [class = content] - > div [class = frame] - > div [class = bg] - > div [class = primary-content] - > DIV [ID =股票]

继承人的CSS ...

#wrapper { 
width: 942px; 
margin: 0 auto; 
position:relative; 
overflow:hidden; 
} 

.main{ 
width:942px; 
margin:163px 0 0; 
overflow:hidden; 
} 

.content{ 
background:url(../images/content-bg.gif) repeat-y; 
overflow:hidden; 
width:662px; 
float:left; 
} 

.frame{ 
background:url(../images/frame-bg.gif) no-repeat 0 0; 
width:662px; 
} 

.bg{ 
background:url(../images/bg-bg.gif) no-repeat 0 100%; 
width:662px; 
overflow:hidden; 
} 
.primary-content{ 
padding: 12px 20px 40px 22px; 
width:620px; 
overflow:hidden; 
} 

#ticker { 
    overflow: hidden; 
} 

而且如果它可以帮助 - 的股票div包含的DIV [列表类= breadcrumps],而我试图滚动

.breadcrumbs{ 
border-bottom:1px solid #ebebeb; 
padding:6px 0 6px 0; 
overflow:hidden; 
clear:both; 
} 

我看到的是 - 当我在前面加上breadcrumps股利股票,页面/股票名单还在不断变大:(

任何帮助,将不胜感激。

谢谢。

回答

20

您需要定义宽度和高度才能使溢出生效,否则它只会展开。

+0

噢是的有道理,相当合乎逻辑:)我把股票的高度放在股票行情,它的工作原理。 非常感谢您的帮助。 虽然我的breadcrumps div里面的股票是可变高度,所以有一个固定的股票股利没有意义,但我想这是唯一的解决方案似乎。 – kapso 2010-04-07 02:15:32