Shopify themes, liquid, logos, and UX
Hi there, I am using the Craft theme which offers the option of an 'arch' image shape in Collections/Product Grids. However, I want to apply this shape to the "image with text" section on the homepage (it only has square as an option).
Can someone advise what CSS I can apply in the theme editor / edit code section to convert the images within this section to an arch shape? Many thanks in advance!! Emily
Image 1, arch style in the craft theme's product grid / Image 2, the image with text section where I want to have an arch image
Solved! Go to the solution
This is an accepted solution.
Hey @emilyinglis,
Try this and see. Please remove everything I have asked you to paste earlier and replace it with this.
<style>
.card:hover .media.media--hover-effect>img,
.card-wrapper:hover .media.media--hover-effect>img {
transform: scale(1) !important;
}
img:not(.header__heading-logo, .banner__media.media img) {
border-top-left-radius: 50% !important;
border-top-right-radius: 50% !important;
}
</style>
This is an accepted solution.
No worries @emilyinglis. Are you launching soon?
Hey @emilyinglis,
Can I have the link to your store?
You can share the draft theme as a preview link @emilyinglis
Ah of course sorry - see here https://834f7d-3.myshopify.com/?_ab=0&_fd=0&_sc=1
Sorry @emilyinglis,
It's password protected. Can you share the store password
Apologies, am rushing for the school run and not thinking - so sorry! Password is "paimpe"
Hey @emilyinglis,
Please try this and let me know 😊
Go to your theme's "Edit Code" Option, then in the search bar type "theme.liquid"
Below the tag "<head>" tag paste the following. Screenshot attached for reference.
<style>
img:not(.header__heading-logo) {
border-top-left-radius: 50% !important;
border-top-right-radius: 50% !important;
}
</style>
Screenshot is for reference only, the correct code to paste is the one shown above.
This is GREAT however it's affecting ALL images on the site which is actually ALSO great however, I do not want the 'image banner' section on the homepage to be affected, I want it to stay the same. Can you advise how to update the code to not include the image banner section?
p.s. when I hover (on desktop) on the collection list section at the bottom of the homepage it does a slight 'zoom in' on the image (which distorts the arch). I can't find where to stop it zooming in as it's not in the theme editor settings for the "collection list" section. Would you happen to know? I am happy for NO images to have this slight zoom in animation/any animation at all, so if easier to add this to your code, i.e. no animation on ANY images, then this would be great!
This is an accepted solution.
Hey @emilyinglis,
Try this and see. Please remove everything I have asked you to paste earlier and replace it with this.
<style>
.card:hover .media.media--hover-effect>img,
.card-wrapper:hover .media.media--hover-effect>img {
transform: scale(1) !important;
}
img:not(.header__heading-logo, .banner__media.media img) {
border-top-left-radius: 50% !important;
border-top-right-radius: 50% !important;
}
</style>
This is fantastic and working perfectly! I will be coming back online tomorrow and buying you a coffee THANK YOU!!
Thank you @emilyinglis, that's very kind of you. I wish you good luck with your store!
Hi there! I'm using these awesome codes but I can't figure out how to adapt it to not be applied to an instagram feed app I added.. Can you help?
Hey @unjadedcharms,
Can you share the link to your store?
Hey @unjadedcharms,
I see the store is password protected. Can you share the password or disable it temporarily?
Ilovekaiser1028 is the PW
You can add this code with the same instructions above @unjadedcharms,
<style>
#instafeed img.splide-img {
border-top-left-radius: 0 !important;
border-top-right-radius: 0 !important;
}
</style>
That is wonderful! Thank you!!
Hi me again! The insta feed looks great. When I click on the highlight story bubbles they show up arched still. Can you assist with that edit? please!
Sure, just add this on as well, instructions are the same
<style>
#zuck-modal-slider-stories .story-viewer img {
border-top-left-radius: 0 !important;
border-top-right-radius: 0 !important;
}
</style>
dang it I am still getting the arch.
Because you pasted the code wrong @unjadedcharms,
If you're going to combine them, then there shouldn't be an extra <style> tag in the middle of an already opened <style></style> tag, and also you are missing a closing curly bracket for the instafeed code.
Ah you're right. I see it now. It worked! thank you!
I'm buying you a coffee today hah I have more more section to "de-arch" its for the Lookfy gallery app.
Hey @unjadedcharms,
Can you replace this code
with
img:not(.header__heading-logo, .banner__media.media img, .product_media+img, .collection_media-img, .kt-grid__item img) {
border-top-left-radius: 50% !important;
border-top-right-radius: 50% !important;
}
Thank you! That is wonderful. Sending you a coffee!
If I want to change the border of an image from a standard square to a rounded corner box like the one below, how can I do that? I'd really appreciate your help!
Hi again, sorry to bother you again!! I am adding a lookbook page and the 'arch' effect is once again being applied to this. I think it's safer to adapt the code so it only applies to all homepage sections apart from the image banner, collections pages and product pages - and no other pages on the website. Are you able to update the code and hopefully this'll stop any future issues. Thank you so much again for you help!
Lookbook example:
Hey @emilyinglis,
If you replace all the code with this, it could work. This only applied to the Image with text section in the homepage and the product images.
Please try and let me know. If it doesn't, then we might need to amend your site code a little.
<style>
.card:hover .media.media--hover-effect>img,
.card-wrapper:hover .media.media--hover-effect>img {
transform: scale(1) !important;
}
.image-with-text__media.image-with-text__media--adapt.global-media-settings.background-transparent.media img,
.card__media img,
.product__media img {
border-top-left-radius: 50%;
border-top-right-radius: 50%;
}
</style>
Thank you! I had to add back in the "important" part after the 50% as it wasn't quite applying right to the image with text sections but now it's all looking great thank you again!
This is an accepted solution.
No worries @emilyinglis. Are you launching soon?
I am! Hopefully this week!
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