Hi all, I am relatively new to coding a website and I am facing difficulties editing the image code for mobile interface.
On the desktop, the interface looks perfectly fine. However, on I am unable to centralise the images on the mobile interface. Is there any way I could solve this problem.
Here the link to my site - https://sugartreegelato.com/
Hi @SugartreeGelato ,
This is Richard from PageFly - Landing page builder, I’d like to suggest this idea:
Step 1: Go to Online Store->Theme->Edit code
Step 2: Asset->/style.css->paste below code at the bottom of the file:
[data-section="BannerSection"] .col-12 {
text-align: center;
}
[data-section="BannerSection"] .col-12 + .col-12 {
margin-top: 20px;
}
I hope it would help you
Best regards,
Richard | PageFly
Hello @SugartreeGelato
It’s GemPages support team and glad to support you today.
I would like to give you a solution to support you.
-
Go to Online Store → Theme → Edit code.
-
Open your theme.liquid theme file.
-
Paste the below code before :
Hope my solution can work and support you!
Kind & Best regards!
GemPages Support Team.
Hi Richard, I’ve tried your method and it works really well for the mobile interface!
However, I noticed that the desktop interface images are not align properly with the coding that you’ve shared. May I know if there is any way to ensure that the desktop images are properly align? Attached below is a photo of how the images look like with the code implemented.
1 Like
Hi @SugartreeGelato ,
I’m sorry to hear that. Please give it a try with this new solution:
You can try replace previous my code by below code:
@media screen and (max-width: 575px) {
[data-section="BannerSection"] .col-12 {
text-align: center;
}
[data-section="BannerSection"] .col-12 + .col-12 {
margin-top: 20px;
}
}
I hope it would help you
Best regards,
Richard | PageFly
1 Like
Hi GemPages Support Team,
Really appreciate the code shared! When using the code, the mobile interface works perfectly. However, is there a way to enhance the code so that the images are not sticking to each other? Attached below is the photo where I’ve drawn arrow in which I would like to see white space between the images. This is because on the desktop interface, there are spaces between each row of images.
Hi Richard,
Thank you very much for the help! The latest code sent works perfectly!
Really appreciate the help!
Best Regards,
Sugartree Gelato
1 Like