开发者

Why am I getting a horizontal scrollbar on the page

I've tried so many things on this page

https://boycottplus.org/campaign/reclaim-our-time-say-no-time-wasting-websites

On the right column, I can't get a padding or margin of 10px between it and the left column without a scroll bar appearing. I've tried using a wrapper div but everything I do seems to bring the scroll bar :-/

The styl开发者_开发技巧e I am focusing on

.subsection .inner {
padding-left: 10px;
}

in firefox


Add overflow:hidden to your body style.


Are you setting width and padding on the same element?

For example, if you have:

.subsection .inner {
    width: 100%;
    padding-left: 10px;
}

then the total width of the inner div will be 100% + 10px, which will result in a scroll bar.


If you want to remove scrollbar in horizontal direction, then use overflow-x: hidden; in that particular HTML element, keeping your vertical scrollbar intact.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜