3

Is it possible to set a to add a scroll-bar vertically but clip horizontally?

EDIT I see some mention on CSS3 in answers. Which browsers support this?

4 Answers 4

7
html { overflow-x:hidden; overflow-y:auto; }

or { overflow-y:scroll; }

Haven't tested but try it.

Sign up to request clarification or add additional context in comments.

2 Comments

for IE8 you may also need -ms-overflow-x: hidden;
@gruntled Is overflow-x/y CSS3? I didn't see it when I was looking at overflow reference online originally.
3
overflow: auto;     /* For CSS 2 user agents */
overflow-x: hidden; /* For UAs implementing the CSS 3 property */

Comments

2

Yes.

overflow-y: auto;
overflow-x: hidden;

Comments

0

For horizontal scrolling:

overflow-x: auto;

For vertical scrolling:

overflow-y: auto;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.