sharataka
sharataka

Reputation: 5132

How to prevent horizontal scrolling on a web app?

When I reduce the width of my browser to the smallest possible amount, I still see the user has the ability to scroll horizontally. Given that I'm using Twitter Bootstrap, I expected this not to be the case. How do I prevent this from happening on this page:

http://warm-chamber-7399.herokuapp.com/

Upvotes: 0

Views: 1480

Answers (2)

Kevin Lynch
Kevin Lynch

Reputation: 24713

This is what you need-

.navbar-wrapper {
    max-width:100%;
    //your other CSS
}

Don't apply it to body or other elements as it can screw things up.

Upvotes: 0

Praveen Dabral
Praveen Dabral

Reputation: 2509

you can use

body{ overflow-x: hidden;}

Upvotes: 1

Related Questions