Cactusroot
Cactusroot

Reputation: 1058

css shift overflow to top-left

I want to display content - other divs containing text - in a div on my website.

The div is a child of a flexbox.

Sometimes, this content is bigger than the size of my div.

But this is not a problem, as I only want the stuff at the bottom-right corner of the content to be visible anyway.

What I do is use the property overflow: hidden;. But this lets the content overflow to the right and bottom instead of the left and top.


What I have:

What I have

What I want:

What I want


I tried:


Do you have any suggestions for what I could try?

Thanks!

Upvotes: 1

Views: 887

Answers (1)

Luca Monetti
Luca Monetti

Reputation: 64

I need the CSS and HTML code to give you a precise answer, but I think that you can solve the issue by giving:

position: relative;
overflow: hidden;

to the parent and:

position: absolute;
bottom: 0;
right:0;

to the child element.

Upvotes: 2

Related Questions