Shopify themes, liquid, logos, and UX
Hello everyone, I have been struggling with this for hours. For my impulse theme website, as seen here below the add to cart I want to add washing instructions with icons but I cant get the icons and text aligned on the same line/sentence. It either ends up above eachother or doesnt line up properly.
I want it properly aligned as seen in the second screenshot, I also want to make the headers bold as seen in the second screenshot.
Help would be greatly appreciated.
Thanks,
Peter
Solved! Go to the solution
This is an accepted solution.
Yeah @Peter2020,
I did mention in the previous example that it may not work with multiple. Which is why I wanted you to test.
Can you delete that code and replace it with this?
<style>
.collapsible-content__inner.rte > p img {
display: inline;
transform: translate(-7px,13px);
}
</style>
This is an accepted solution.
Hey @Peter2020,
Just replace it with this.
<style>
.collapsible-content__inner.rte img {
display: inline !important;
transform: translate(-7px,13px) !important;
}
</style>
Hi @Peter2020
Would you mind to share your store URL? Thanks!
Thanks for the info, check this one.
From your Shopify admin dashboard, click on "Online Store" and then "Themes".
Find the theme that you want to edit and click on "Actions" and then "Edit code".
In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
.collapsible-content__inner.rte p {
display: flex;
}
#Product-content-tab8735018090842 > div > p {
gap: 10px;
}
And Save.
Result:
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
Hey @Peter2020,
You could try this, although I have a suspect that if you add another icon and a text, it may fall on the same line. Could you try that also please?
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>
.collapsible-content__inner.rte p:has(img) {
display: flex;
align-items: center;
}
.collapsible-content__inner.rte p img {
margin-right: 10px;
}
</style>
Screenshot is for reference only, the correct code to paste is the one shown above.
That worked, thank you so much, again!
Actually this didnt work, it worked when it was just one icon and line but I need a bunch of them under eachother.
This is what happened
This is an accepted solution.
Yeah @Peter2020,
I did mention in the previous example that it may not work with multiple. Which is why I wanted you to test.
Can you delete that code and replace it with this?
<style>
.collapsible-content__inner.rte > p img {
display: inline;
transform: translate(-7px,13px);
}
</style>
I have overlooked that sorry, to eager to fix it hehe.
This worked perfectly. Again, Thank you for all the help.
This worked but then I made some changes to the font of the content (its connected to a page) and now its back to this.
This is an accepted solution.
Hey @Peter2020,
Just replace it with this.
<style>
.collapsible-content__inner.rte img {
display: inline !important;
transform: translate(-7px,13px) !important;
}
</style>
That solved it, thank you.
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024