on-internet
← Community

How can I make a child element escape a parent with overflow: hidden without breaking my layout?

Stack Overflow ·

I’m working on a layout where the parent element has the following properties: .parent { position: relative; height: 350px; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; display: flex; justify-content: flex-end; align-items: center; } The parent contains a child element (a <div> or <span>), and I want this child to visually move outside the boundaries of the parent by using negative margins or positioning. The problem is that because the parent has overflow: hidden, the child gets cut and doesn’t show outside the parent’s boundaries. I cannot remove overflow: hidden on the pare

Comments

Sign in or sign up to comment and upvote.

No comments yet.