質問

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?

役に立ちましたか?

解決

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

他のヒント

You can try this

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

}

or

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

or

body {
    background-color: yourcolor;
}

I was having this exact problem with a page, and just adding that padding-left:0px; and padding-left:0px; to the body tag in my css did the trick perfectly without fuxing up any of my other shiz. thanks a lot, its a simple fix, but sometimes simple things like that dont mesh well with bootstrap so its nice just to find the right one. :)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top