Community Forums › Forums › Archived Forums › Design Tips and Tricks › Scale background cover image properly
Tagged: scaling cover images
- This topic has 5 replies, 4 voices, and was last updated 7 years, 12 months ago by
Kitty.
-
AuthorPosts
-
December 26, 2016 at 10:20 pm #198250
webharvest
ParticipantI'm using the wellness pro theme and I was checking out how my site looks on an iPad and a IPhone Plus. The frontpage background images don't scale properly. All you see is a small piece of the image. I figured it was because the images sizes are just too big that are recommended in the theme settings.
So I added some custom CSS which I thought would replace the background image for the front-page-1 section on the iPad and IPhones. When I use the chrome developer tool it switches to the other image and all looks good but when I go to the actual iPhone and iPad it is like the larger image is still being used.
@media only screen
and (min-device-width : 414px)
and (max-device-width : 736px) {
.front-page-1 {
background-image: url(http://www.mysite.com/xxxxxx-480.png);
}
}
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
.front-page-1 {
background-image: url(http://www.mysite.com/xxxxxx--860.png);
}
}I don't understand why it would look good on my computer and confirmed using the right image with chrome developer but not with the actual devices.
Any ideas/suggestions would be greatly appreciated.
http://www.e3financialcoaching.comDecember 27, 2016 at 7:38 am #198277Victor Font
ModeratorDifferent device resolutions perhaps? Try using retina images for Apple devices.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?December 28, 2016 at 11:56 am #198383webharvest
ParticipantIs there a good rule for what the best way is to implement scaleable image for apple devices?
December 29, 2016 at 10:59 am #198430webharvest
ParticipantI don't fully like the solution I came up with but it appears that the iPad and iPhone don't like the background-attachment: fixed when the background-size is set to cover. I changed the background-attachment: scroll using @media conditions and it sizes the image properly now.
Don't know why it acts strange with it set to fixed.
January 17, 2017 at 12:44 pm #199569Lisa at OG
MemberI had the same problem with the Centric Pro Theme and also the Wellness Pro Theme. Adding the background-attachment: scroll !important worked for me as well. When I got a reply from StudioPress customer service they said the following, "Unfortunately, it's a limitation on iOS, where fixed background image property is ignored on purpose to conserve browser's processing, in effort to ensure performance. But, I'll be happy to pass on this feedback to the development team, so they can review and possibly include some CSS workaround, in next theme's update."
December 18, 2017 at 2:39 am #214657Kitty
Participant...and that is really appreciated, Lisa! Thank you for sharing!
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.