开发者

Why am I getting a horizontal scrollbar on the page

开发者 https://www.devze.com 2023-03-31 01:11 出处:网络
I\'ve tried so many things on this page https://boycottplus.org/campaign/reclaim-our-time-say-no-time-wasting-websites

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

精彩评论

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