开发者

overflow y property

I have used the overflow-y: auto; property to set scroll for overflown values of a column. However the overflow also gets applied to the x-axis, but I don't want that. Is there an alternative, or any changes I need to make so that it only overflows on the y-axis?

.leftbarInner {
    width: 150px;
    *width: 135px;
    height: 448px;
    *height: 442px;
    background-color: #5C7E9F;
    padding-right:开发者_开发知识库 5px;
    *padding-right: 0px;
    overflow-y: auto;
}

I am using IE 7 as a browser.


You can find some nice examples of overflow x and y here: http://www.brunildo.org/test/Overflowxy2.html

Note that it does not display same in all browsers and is a css3 property.


Check you don't have overflow:auto; after below two css properties. CSS properties also gets applied in the order you specify them. So if overflow:auto is after overflow-x:hidden; then it will override and still show x-axis scroll.

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜