Tagged: cornerstone
-
AuthorPosts
-
October 1, 2016 at 8:37 am #1198481
Hello,
Is there a way to pick witch side of the background image shows in mobile instead of it just showing the center of the background image? I would like for it to show the right side. Is there a percentage I can scoot it over or something? How would I do that?
thanks, God bless!
October 1, 2016 at 5:06 pm #1198786Hi there,
Thanks for writing in.
Would you mind providing your site’s URL that has this background?
It can be controlled by background-position. http://www.w3schools.com/cssref/pr_background-position.asp
Though, I’m not really sure how to apply it unless I could see how your background image is setup.
Thanks!
October 1, 2016 at 6:19 pm #1198823October 1, 2016 at 6:20 pm #1198824on the desktop it’s great, but i would like to be able to decide where to position the background images when it comes to tablet and mobile since it only shows the center of the image on those devices.
October 2, 2016 at 1:25 am #1199050Hello There,
Thanks for getting back to us. To be able to decide where to position the background images when it comes to tablet and mobile, please edit your page in Cornerstone and insert the following custom css in the settings tab, Settings > Custom CSS
/* tablet */ @media(max-width: 979px){ #x-section-1 { background-position: top left; /* top left, top right, top center */ } } /* phone */ @media(max-width: 480px){ #x-section-1 { background-position: top left; /* top left, top right, top center */ } }
Please make sure that you have the correct section ID.
Hope this helps.
October 2, 2016 at 11:46 am #1199428it did not seem to do anything
October 2, 2016 at 12:18 pm #1199462Hi there,
Thanks for writing back. I don’t see the code on your site and also the section is hidden for mobile. So you can try updating the code for section 2 :
/* tablet */ @media(max-width: 979px){ #x-section-2 { background-position: top left; /* top left, top right, top center */ } }
Use this if you only want to set different background position for mobile devices, otherwise the above code is fine for mobile as well.
/* phone */ @media(max-width: 480px){ #x-section-2 { background-position: top left; /* top left, top right, top center */ } }
Make sure your other code is closed properly if that doesn’t take effect.
Thanks!
October 2, 2016 at 12:35 pm #1199481that tricky hidden mobile section haha, thank you for being so helpful.
ok yes that is great. I would like to be able to choose more than just all the way right though. Like somewhere in the middle that is not center or right you know. Is there a percentage I can use or something for this?
October 2, 2016 at 1:45 pm #1199538Hi there,
Thanks for writing back. Yes you can use your own positioning with percentage as well like :
#x-section-2 { background-position: 30% 20%; }
or
#x-section-2 { background-position: 30px 20px; }
You need to figure out which one fits you best.
Thanks!
October 2, 2016 at 3:33 pm #1199608oh awesome perfect, thank you so much
October 2, 2016 at 7:12 pm #1199736Happy to hear that.
Feel free to ask us again.
Thanks.
-
AuthorPosts