1

If I set overflow:scroll for a div with fixed height, then both horizontal scroll and vertical scroll bars appears. I know that I can remove horizontal scroll bars by using overflow-x:hidden. Is there a way to do this without using overflow-x because it fails in css(2.1) validation?

Ref: http://jsfiddle.net/s7SVZ/

1 Answer 1

5

YOu can give overflow:auto to it. Write like this:

#div1{
    width: 200px;
    height: 200px;
    overflow: auto;
    border: 1px solid red;
}

Check this http://jsfiddle.net/s7SVZ/1/

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

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.