Personalized checkout and custom promotions with Shopify Scripts
I was hoping to use either the custom liquid or custom html block in the empire theme to add code that will display my logo at the top of the product page centered right in the middle. Would you possibly know which section block is better to use for this case & what the code would look like if i wanted to add a logo within these section blocks.
I am trying to figure out the code to add a logo within the custom liquid/html block on my empire theme to make it look like a funnel. I want it to look responsive in all devices. So far I have this code; <div style="text-align: center;">
<img src=“Image url here“ alt=""></div>
but it isn’t congruent with my store. (Image too large)
If anyone could offer support that would be greatly appreciated.
Solved! Go to the solution
This is an accepted solution.
Do this instead:
<div style="display: flex; justify-content: center; align-items: center; width: 100%;">
<img style="max-width: 600px;" src="Image url here" alt="">
</div>
Play with the max-width property on the image to your liking.
This is an accepted solution.
Do this instead:
<div style="display: flex; justify-content: center; align-items: center; width: 100%;">
<img style="max-width: 600px;" src="Image url here" alt="">
</div>
Play with the max-width property on the image to your liking.
Hi Brandon,
It works great. Is there a way to remove all the margin and padding as there is too much white space around the logo. how would i fit this code within the code you showed earlier?
Hi there, are you able to send a link to the site? I'm thinking it is default padding/margins that come with some section blocks. If you want 0 margins/padding, we'll have to select it by it's shopify section ID.
Nevermind, it was related to another section i had underneath. It seems fine now.
If you dont mind could you elaborate on how to select it by its shopify section id. Sounds interesting.
Thanks a lot
Sure, each new block you put on your page in the theme customizer gets a unique ID on the HTML markup. That way on the CSS front you can select specifically that one block and add new styling without affecting the rest of the blocks. Again, each of these blocks have styling already attached to them dependent on what theme you have. You can read more on CSS specificity here.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024