开发者

CSS - use a horizontal scrollbar only

i need to use an horizontal scollbar only if the content of the div is longer than the 开发者_StackOverflowwidth 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


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


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.


Try

.viewgallerylist {
  overflow-y: hidden;
}


Use overflow-y: hidden.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜