Reputation: 2815
I have a CSS and HTML related problem. I have one main div which has a background color and is supposed to be visible. Inside of that I have a wrapper that contains multiple smaller divs. Only one of these children will fit inside the bigger div at one time, but I want the others to align vertically besides it with a scroll bar, so I can scroll between the divs. I do not want the divs that's outside my main div to be visible and expand the site.
I've tried to float the to the left, but they only align underneath each other. Even when I set the wrappers div to be auto. But if I set a specific width that will fit all the smaller divs (I.e. 7000px), they will align vertically. But even those who is pushed outside if the "main" div will be visible, and the site is stretched.
So is this possible to do? It's like you do with text, when you just want it inside a specific div (like here in the text editor, only vertically and with divs).
Hope someone can help! ;)
Upvotes: 1
Views: 1124
Reputation: 3726
You can use overflow: hidden
css on the parent div
.
Better make a fiddle illustrating the problem so it will be easier for others to suggest a fix.
Upvotes: 1