Search code examples
htmlcsstwitter-bootstrapmobiletwitter-bootstrap-2

Bootstrap 2.3.2 mobile 100% width background


I have a problem with mobile resolutions, because background is not 100% width when I use smaller reolutions. It looks like this:

enter image description here

When I use higher resolutions, it works fine. I have tested my website by using http://mattkersley.com/responsive/ and it shows that 100% width background works only from 768 x 1024 (iPad - Portrait).

How can I fix it?


Solution

  • Remove this lines from bootstrap.responsive.css file then body will be 100% fill

    body {
        padding-left: 20px;
        padding-right: 20px;
    }
    

    Or alternatively, you can also change this to

    body {
            padding-left: 0;
            padding-right: 0;
        }
    

    Try either of the two, that'll work for you