How can I align icons with text in Impulse theme?

Solved

How can I align icons with text in Impulse theme?

Peter2020
Excursionist
33 0 4

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 

Screenshot 2024-02-03 at 1.26.27 AM.png


Screenshot 2024-02-03 at 1.29.32 AM.png

Accepted Solutions (2)
ThePrimeWeb
Shopify Partner
2138 615 497

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>

 

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!

View solution in original post

ThePrimeWeb
Shopify Partner
2138 615 497

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>

 

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!

View solution in original post

Replies 11 (11)

Made4uo-Ribe
Shopify Partner
7609 1833 2245

Hi @Peter2020 

Would you mind to share your store URL? Thanks!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.

Peter2020
Excursionist
33 0 4
Made4uo-Ribe
Shopify Partner
7609 1833 2245

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:

Made4uoRibe_0-1706897777168.png

 

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.

ThePrimeWeb
Shopify Partner
2138 615 497

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.

ThePrimeWeb_1-1706896839967.jpeg

 

 

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!
Peter2020
Excursionist
33 0 4

That worked, thank you so much, again!

Peter2020
Excursionist
33 0 4

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 happenedScreenshot 2024-02-03 at 4.48.37 PM.png

ThePrimeWeb
Shopify Partner
2138 615 497

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>

 

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!
Peter2020
Excursionist
33 0 4

I have overlooked that sorry, to eager to fix it hehe.

 

This worked perfectly. Again, Thank you for all the help.

Peter2020
Excursionist
33 0 4

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.

Screenshot 2024-02-03 at 9.02.36 PM.pngScreenshot 2024-02-03 at 9.04.17 PM.png

ThePrimeWeb
Shopify Partner
2138 615 497

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>

 

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!
Peter2020
Excursionist
33 0 4

That solved it, thank you.