imjp
imjp

Reputation: 6695

div keeps overflowing no matter what (details inside)

Take a look at this page and click on the arrows to activate the carousel: http://bethhaim.spin-demo.com/browse/divisions/i

As you can see, the ul overflows over the div with the black background, I need to fix this.

I've created a class called .stop_overflowing_plz and inside of that I've put a ul which is part of the carousel you see. The purpose of that new class is to stop the ul from overflowing all the way over the black div, but isn't working as intended.

Anyone know what I could do in order to keep the ul inside of .stop_overflowing_plz and stop it from overflowing like it currently is doing?

Upvotes: 0

Views: 80

Answers (2)

CherryFlavourPez
CherryFlavourPez

Reputation: 7487

You need to add position: relative to your stop_overflowing_plz div.

As you're setting position: absolute on your ul, you need to make your div the containing block.

Upvotes: 1

ChrisPatrick
ChrisPatrick

Reputation: 984

You appear to have the following CSS applied to the ul:

.le_carousel .overview {
list-style: none;
position: absolute;
padding: 0;
margin: 0;
left: 0 top: 0;
}

You need to change position to relative otherwise it will always position itself relative to the page and not the surrounding div.

Upvotes: 2

Related Questions