Justin
Justin

Reputation: 367

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 style I am focusing on

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

in firefox

Upvotes: 0

Views: 5713

Answers (3)

Sawan Kumar Das
Sawan Kumar Das

Reputation: 1

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

Upvotes: 0

Douglas
Douglas

Reputation: 37763

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.

Upvotes: 1

Jayantha Lal Sirisena
Jayantha Lal Sirisena

Reputation: 21366

Add overflow:hidden to your body style.

Upvotes: 4

Related Questions