CSS overflow: hidden; does not work

I have problems with overflow: hidden ones do not work in my case.

I have a div id = ticker, which basically works like scrolling. So I add dynamic content to div id = ticker

Div id = ticker is contained in another div, which is contained in another div, basically thinks of it as a tree of level 4-5, such as a structure

body β†’ div [id = wrapper] β†’ div [class = main] β†’ div [class = content] β†’ div [class = frame] β†’ div [class = bg] β†’ div [class = primary-content] β†’ div [id = ticker]

Here she is...

#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; } 

Also, if that helps - the div in the ticker contains a list of div [class = breadcrumps], which I'm trying to scroll through

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

What I see is when I add breadcrumps div to the ticker, the list of pages / tickers continues to grow: (

Any help would be appreciated.

Thanks.

+4
source share
1 answer

you need to determine the width and height for the overflow to work, otherwise it just expands.

+20
source

Source: https://habr.com/ru/post/1306191/


All Articles