Cart button with text

Cart button with text

pimpãoclothing
Tourist
45 0 16

Hello! I'm creating my first online store, and I needed help creating this button. I used this code below but it makes the text appear to the right of the icon and then misaligns everything. Can you help me? Thanks

 

Captura de ecrã 2025-04-05 004818.png

 

.header__icon--cart:after {
content: "Itens";
position: relative;
font-size: 14px;
}

 

Preview link: https://umhw5c-2w.myshopify.com/?_ab=0&_fd=0&_sc=1

Pass: mahpor

Reply 1 (1)

Mastery
Tourist
7 0 1

If you're adding "Itens" using :after, it can mess up alignment because it's just tacked on with no layout control. One trick is using flexbox on the cart icon wrapper to fix that — quick and clean.

I've handled this for a few store owners before. There’s a better way to keep everything aligned depending on your theme setup. If you're open to it, I can take a closer look and walk you through what would work best. Just shoot me a message.

Paul D