Archived topic
background image not good in iPad
5 replies · Started by Ali on September 12, 2016
Dear Tom,
Hope you are fine.
Please have a look here:
http://www.narenj-toranj.ir
In desktop, everything is very good. But when I open the website in iPad, (both vertical and horizontal view), the background image is not good.
Please help.
Cheers
Ali
Hi there,
What about it isn't good?
In desktop, the picture covers the width of screen perfect. But in iPad, I can only see a part of picture as a background. It seems that the picture stretched.
Here is a picture that shows the difference:
http://narenj-toranj.ir/wp-content/uploads/2016/09/screenshot.jpg
Thanks.
Unfortunately that's just how fixed backgrounds scale.
You could set the size to "Contain", but it probably won't look very good on desktop.
A solution is to add a different background image with a better aspect ratio on mobile:
@media (max-width: 900px) {
body {
background-image: url( URL TO YOUR IMAGE );
}
}
Thanks for help :)
No problem :)