Reputation: 27
On desktop everything is of, but if you check it on ipad or smartphone the Background does not works. The client asked me for a full screen picture; On desktop is okay, but on Ipad, when you switch between Portrait and Landscape you need to refresh the page, and it's looks like "repeted".
How can i solve it?
Upvotes: 0
Views: 427
Reputation: 980
body {
background-size: cover;
}
just add background-size to your body tag
Upvotes: 0
Reputation: 761
You need to take a look on responsive web design. Using RWD you can re-scale your image while working on different devices. Take a look on Media Queries. That will solve your problem and your website will fit within any device. Apart if you need anything you can ask.
Upvotes: 0
Reputation: 1514
It jumps because you set the wrapper height to the body height using javascript (but you don't update it on screen resize). One option would be to update the wrapper height every time the screen resizes
Buy why don't you just remove the javascript and use css:
html,body,#wrapper{height:100%;}
Upvotes: 0
Reputation: 47
Do you need to set section height via js? You can use CSS:
html, body { height:100%; } and #wrapper { height:100%; }
I've also noticed that you set the same background for body and #wrapper and it looks like it's repeated so delete bg from one of these elements.
Upvotes: 1
Reputation: 2169
Try this;
html {
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
Upvotes: 0