Reputation: 1356
I'm looking for a solution for combining different x and y overflow.
Following code:
div {
overflow-x: visible;
overflow-y: hidden;
}
doesn't work. I want a simple method to hide horizontal scrollbar, keeping the vertical overflown content visible. I do not want to change the DIV's height in layout. Any tricks?
Upvotes: 0
Views: 80
Reputation: 15739
Use the below.
div {
overflow-x: hidden;
overflow-y: scroll;
}
The HTML Code:
<div>This is a div.</div>
The CSS Code:
div {
overflow-x: hidden;
overflow-y: scroll;
display:inline-block;
}
Hope this helps.
Upvotes: 0
Reputation: 85545
I want a simple method to hide horizontal scrollbar, keeping the vertical overflown content visible.
for horizontal -> overflow-x
for vertical -> overflow-y
You could just use
div{
overflow-x: hidden;
overflow-y: auto; // if you don't want scrollbar use visible
}
Upvotes: 1