We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How can I center payment icons below the buy button?

Solved

How can I center payment icons below the buy button?

Simone_Muc_2
Tourist
5 0 1

Hello, 

 

I want to center the payment icons below the buy button but it does not work. I am using the dawn theme and added the code with a custom liquid. 

 

<div class="footer__payment" style="text-align: center">
<span class="visually-hidden">{{ 'sections.footer.payment' | t }}</span>
<ul class="list list-payment" role="list">
{%- for type in shop.enabled_payment_types -%}
<li class="list-payment__item">
{{ type | payment_type_svg_tag: class: 'icon icon--full-color' }}
</li>
{%- endfor -%}
</ul>
</div>

 

 

The style="text-align: center won't work. It still looks like this (please take a look at the screenshot)

 

Screenshot 2022-08-13 at 17.13.27.png

 

Can anybody help?

Accepted Solution (1)

MarkV2
Shopify Partner
35 2 3

This is an accepted solution.

Try this:

 

<div class="footer__payment" style="text-align:center">
<div style="display:inline-block">
<span class="visually-hidden">{{ 'sections.footer.payment' | t }}</span>
<ul class="list list-payment" role="list">
{%- for type in shop.enabled_payment_types -%}
<li class="list-payment__item">
{{ type | payment_type_svg_tag: class: 'icon icon--full-color' }}
</li>
{%- endfor -%}
</ul>
</div>
</div>

View solution in original post

Replies 2 (2)

MarkV2
Shopify Partner
35 2 3

This is an accepted solution.

Try this:

 

<div class="footer__payment" style="text-align:center">
<div style="display:inline-block">
<span class="visually-hidden">{{ 'sections.footer.payment' | t }}</span>
<ul class="list list-payment" role="list">
{%- for type in shop.enabled_payment_types -%}
<li class="list-payment__item">
{{ type | payment_type_svg_tag: class: 'icon icon--full-color' }}
</li>
{%- endfor -%}
</ul>
</div>
</div>
Simone_Muc_2
Tourist
5 0 1

Perfect, thank you so much, it worked!