Is there anyway to make overflow in x visible while y is scrollable?

.foo {
overflow-x: visible;
overflow-y: auto;
}
.foo {
overflow-x: visible;
overflow-y: auto;
}
From https://developer.mozilla.org/en-US/docs/Web/CSS/overflow
Setting overflow to visible in one direction (i.e. overflow-x or overflow-y) when it isn't set to visible or clip in the other direction results in the visible value behaving as auto.
Is there anyway to get around this?
3 Replies
EIO
EIO2w ago
What are you trying to achieve? Can you describe better or share a screenshot?
Pradeep
Pradeep2w ago
If content fits inside the element's padding box, it looks the same as with visible but still establishes a new formatting context.
Rägnar O'ock
Rägnar O'ock2w ago
You've posted the answer to your own question. (No) Which leads me to believe that's not exactly what you want to do. What is it you are trying to achieve exactly and what did you try so far? There's a lot of information missing for us to help you correctly, you can check https://discord.com/channels/436251713830125568/1022288836715356180 for help on how to improve your question.

Did you find this page helpful?