meds
meds

Reputation: 22926

Overflow - hide scrollbar and disable scrolling but don't clip the element

When I use the following:

body {
    overflow: hidden;
}

The element that is overflowing is clipped, when I do the following:

body {
   overflow: auto;
}

It's not clipped but now there's a scrollbar where it's going over.

I'd like to make the element not clip but also to not show the scrollbar or be scrollable

Upvotes: 2

Views: 1036

Answers (1)

Edouard Reinach
Edouard Reinach

Reputation: 614

So basically, you don't want to control overflow, since you don't want the element to overflow. You want its parent container to adapt to whatever the size of the element.

It can be done in multiple ways. One of the best being, not doing anything since most HTML elements won't clip whatever's inside them.

Except for window, which is the boundaries of your browser. And it can't be skinned anyway.

I don't have much informations, but a wild guess would be to believe that you are trying to have an iframe behave like a regular HTML element.

Upvotes: 1

Related Questions