How can I center an image "BE PART OF IT" with custom code on my home page?

HPJ
Tourist
10 0 3

How can I center the image "BE PART OF IT" with custom code on my home page (https://happypawsjewelry.com). On the mobile looks great, however on the laptop the image is aligned to the left. Any help is appreciated. Thank you guys

 

Screenshot 2020-12-13 at 15.01.31.png

0 Likes
ryanpwaldon
Explorer
50 6 12

Hey @HPJ!

Add the following attribute to your image tag:

style="margin: auto"

Let me know how it goes!

P.S. I removed my original post (I missed some details in your image at the time).



Grow your sales with Bag — a new shopping cart for Shopify.
Learn more →







0 Likes
HPJ
Tourist
10 0 3

Hi Ryan, thanks for your help but it didn't worked. Any other solution?

0 Likes
ryanpwaldon
Explorer
50 6 12

Ahh, it's always a bit hard to debug without being able to see your code.

I do have another suggestion (if you haven't figured it out already). Try change the container width to 100%, and add the following attribute instead:

 

style="margin: auto; width: 50%"

 

Let me know how it goes! 



Grow your sales with Bag — a new shopping cart for Shopify.
Learn more →







0 Likes
HPJ
Tourist
10 0 3

Hi Ryan not working still! Any feedback on this would be great. Thank you.

 

Here is the code that I have been using:

 

<img src="https://cdn.shopify.com/s/files/1/0510/3180/2037/files/Be-Part-Of-It.jpg?v=1607555983" alt="happypawjewelry" class="center">

0 Likes