Shopify themes, liquid, logos, and UX
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
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)
Can anybody help?
Solved! Go to the solution
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>
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>
Perfect, thank you so much, it worked!