Shopify themes, liquid, logos, and UX
How do I get this custom section liquid aligned center under the buy buttons like the picture attached?
Can somebody help me?
My store id is: 2e208a.myshopify.com
Hi @Lucas1200
Check this one.
From you Admin page, go to Online Store > Themes
Select the theme you want to edit
Under the Asset folder, open the main.css(base.css, style.css or theme.css)
Then place the code below at the very bottom of the file.
.ss-payment-list {
width: 44rem;
}
And save.
Result:
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
For the text it works, but the icons stay left....
Yeah, but as I checked, it's not the code I provided. You changed 44rem to 65%, I used 44rem for the width because it is the length of the 'Add to Cart' button.
Replace on this one so it will be responsive.
.ss-payment-list {
max-width: 44rem;
width: 100%;
}
And Save.
Result:
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
It still doesnt work, is there sometinh wrong with the style code of this section?
<style>
/*
Section styling
*/
.ss-payment-text {
width: 100%;
text-align: center;
margin: 0;
color: {{ section.settings.color }};
}
.ss-payment-list {
list-style: none;
display: flex;
flex-wrap:wrap;
justify-content:center;
padding: 0;
}
.ss-payment-item {
text-align: center;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
}
.ss-payment-icon {
display: flex;
justify-content: center;
margin-bottom: .5rem;
}
.ss-payment-icon svg {
max-width:{{ section.settings.icon_size }}px;
max-height: calc({{ section.settings.icon_size }}px * 0.66);
}
.ss-payment-icon img {
max-width:{{ section.settings.icon_size }}px;
max-height: calc({{ section.settings.icon_size }}px * 0.66);
margin: 0 10px;
}
.ss-payment-text {
margin-bottom: 3px;
font-size:{{section.settings.text_size}}px;
}
@media only screen and (max-width: 450px) {
.ss-payment-icon svg {
max-width:{{ section.settings.icon_size_mobile }}px;
max-height: calc({{ section.settings.icon_size_mobile }}px * 0.66);
}
.ss-payment-icon img {
max-width:{{ section.settings.icon_size_mobile }}px;
max-height: calc({{ section.settings.icon_size_mobile }}px * 0.66);
}
}
/*
Styles based on settings
*/
#ss-payment-list-{{ section.id }} {
{% unless section.settings.bg_color == 'rgba(0,0,0,0)' %}
background-color: {{ section.settings.bg_color }};
{% endunless %}
{% unless section.settings.color == 'rgba(0,0,0,0)' %}
color: {{ section.settings.color }};
{% endunless %}
padding-top: {{ section.settings.pt }}rem;
padding-bottom: {{ section.settings.pb }}rem;
margin-top: {{ section.settings.mt }}rem;
margin-bottom: {{ section.settings.mb }}rem;
}
</style>
Hi @Lucas1200,
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </head> tag:
<style>
@media only screen and (min-width: 750px) {
.ss-payment-list {
width: 59% !important;
}
}
</style>
Here is result:
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍
Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
For the text it works, but the icons stay left....
Go to online store ---------> themes --------------> actions ------> edit code------->assets-----> section-main-product.css
add this code at the end of the file.
@media screen and (min-width: 750px) {
.ss-payment-list {
width: 59%;
}
}
result
If this was helpful, hit the like button and accept the solution.
Thanks
For the text it works, but the icons stay left....
TRY this code:-
Go to online store ---------> themes --------------> actions ------> edit code------->base.css
at the end of the file and save.
@media screen and (min-width: 750px) {
ul#ss-payment-list-template--19886100480346__ss_payment_icons_4y9ckC {
width: 59%;
}
}
result
If this was helpful, hit the like button and accept the solution.
Thanks
It still doesn't work, is the style of this section wrong?
<style>
/*
Section styling
*/
.ss-payment-text {
width: 100%;
text-align: center;
margin: 0;
color: {{ section.settings.color }};
}
.ss-payment-list {
list-style: none;
display: flex;
flex-wrap:wrap;
justify-content:center;
padding: 0;
}
.ss-payment-item {
text-align: center;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
}
.ss-payment-icon {
display: flex;
justify-content: center;
margin-bottom: .5rem;
}
.ss-payment-icon svg {
max-width:{{ section.settings.icon_size }}px;
max-height: calc({{ section.settings.icon_size }}px * 0.66);
}
.ss-payment-icon img {
max-width:{{ section.settings.icon_size }}px;
max-height: calc({{ section.settings.icon_size }}px * 0.66);
margin: 0 10px;
}
.ss-payment-text {
margin-bottom: 3px;
font-size:{{section.settings.text_size}}px;
}
@media only screen and (max-width: 450px) {
.ss-payment-icon svg {
max-width:{{ section.settings.icon_size_mobile }}px;
max-height: calc({{ section.settings.icon_size_mobile }}px * 0.66);
}
.ss-payment-icon img {
max-width:{{ section.settings.icon_size_mobile }}px;
max-height: calc({{ section.settings.icon_size_mobile }}px * 0.66);
}
}
/*
Styles based on settings
*/
#ss-payment-list-{{ section.id }} {
{% unless section.settings.bg_color == 'rgba(0,0,0,0)' %}
background-color: {{ section.settings.bg_color }};
{% endunless %}
{% unless section.settings.color == 'rgba(0,0,0,0)' %}
color: {{ section.settings.color }};
{% endunless %}
padding-top: {{ section.settings.pt }}rem;
padding-bottom: {{ section.settings.pb }}rem;
margin-top: {{ section.settings.mt }}rem;
margin-bottom: {{ section.settings.mb }}rem;
}
</style>
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024