tags:

views:

57

answers:

4

hi. 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

A: 

Try

.viewgallerylist {
  overflow-y: hidden;
}
Yi Jiang
A: 

Use overflow-y: hidden.

casablanca
+2  A: 

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.

Fincha
+3  A: 
.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)

Blaise Kal