开发者

Overflow oddity

开发者 https://www.devze.com 2022-12-14 04:14 出处:网络
What is the status on overflow-x and overflow-y?Whenever I give overflow a value, and inspect that element, the browsers tend to split this into overflow-x and overflow-y.However, trying to explicitly

What is the status on overflow-x and overflow-y? Whenever I give overflow a value, and inspect that element, the browsers tend to split this into overflow-x and overflow-y. However, trying to explicitly state this gives nothing.

For example, on my math class page: http:math.davehampson.net the grades tab is very wide, and I want it to scroll within the <div> There is no height declared, so it stretches down, and I get a horizontal scroll bar.

By problem is that I also get an unneeded vertical scroll bar. If I change overflow:scroll to overflow-x:scroll, then nothing happens. The table is displayed in full width, and the entire page scrolls. Which, because the body is black, does not show up.

Is there a way for me to eliminate this inactive vertical s开发者_开发问答croll bar?

Thanks, Dave


overflow:auto only adds a scroll bar when the content within it exceeds the allocated space.

So if you only need a horizontal scroll, make sure the height of the content is less than the height of the enclosing div, if that makes sense.

0

精彩评论

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