Bootstrap 2.3 CSS Responsive left with a white space on the right

Andrew picture Andrew · Jun 9, 2013 · Viewed 22.1k times · Source

I'm creating a website (and I'm a noob at this). I'm working on the functionality portion of design and i'll have someone do graphics later.

Currently when it goes into responsive (mobile view) it leaves a 2px margin on the right that is movable on a mobile browser (and scrollable). I can't for the life of me get rid of that.

if I turn on overflow-x: hidden, then it does become non scrollable but still movable.

I want that extra space to go away. I don't see it defined as padding in any of the css.

Using Bootstrap 2.3

Answer

Andrew picture Andrew · Jun 9, 2013

Solved by adding this to my custom css:

html, body {
  width: auto !important;
  overflow-x: hidden !important;
}

Note: the !important is only being used so it takes priority over other CSS. Most instances will not need !important if you load your custom CSS after your bootstrap CSS.