5

i need to use an horizontal scollbar only if the content of the div is longer than the width value.

so i write :

.viewgallerylist{width:920px; float:left; padding-top:20px; height:120px; border-bottom:1px #000000 solid; overflow-x: scroll;}

the problem is that the scrollbar are 2, 1 horizontal and 1 vertical. How to remove the vertical one? cheers

4 Answers 4

11
.viewgallerylist {
    min-width: 920px;
    overflow: hidden;
    -ms-overflow-x: auto; /* IE8 */
    overflow-x: auto;
}

(min-width doesn't work in IE6, in case you still want to support that dinosaur)

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

Comments

4

overflow-x:scroll creates a horizontal scrollbar if the content exceeds the width of the container. overflow-y:scroll creates a vertical scrollbar if the contents exceeds the height of the container.

Comments

3

Try

.viewgallerylist {
  overflow-y: hidden;
}

Comments

2

Use overflow-y: hidden.

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.