All things Shopify and commerce
I have a simple image of a heading on my home page placed using this code.
img {
display: block;
max-width: 40%;
}
It is currently justified to the left. Can someone tell me the correct code to centre it.
Thanks
Hello @Leeloo
can you please provide the screen shot of your heading image.
Thanks so much!! That worked! I was having trouble attaching a screenshot!! 😝
Hey again. That worked but it's become super tiny on the mobile view? Anything I can do to fix it? Thank you!
The url is www.chantalhandley.com and it's the image that says 'Fine Art by Chantal Handley'. Looks great on the desktop view! 😄
Thank you!
Yep!! 👍 Thanks! Bought you a coffee! ☕😍
Hello @Leeloo
Go to online store ----> themes ----> actions ----> edit code---->base.css
add this code at the end of the file.
@media screen and (max-width: 749px) {
#shopify-section-template--17303032529118__custom_liquid_qdtqTq img {
display: block;
max-width: 60%;
margin: 0 auto;
}
}
result
If this was helpful, hit the like button and accept the solution.
Thanks
Not sure it worked?
hello @Leeloo
Can you tell me exactly which image heading you are talking about? Please take a screenshot and tell me.
thanks
In today’s interview, we sat down with @BSS-TekLabs to discuss practical strategies for...
By JasonH Nov 13, 2024The year-end shopping spree is around the corner! Is your online store ready for the ...
By JasonH Nov 10, 2024We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024