Re: Center add to cart and quantity and make them on same line

Center add to cart and quantity and make them on same line

mylittleworld
Excursionist
36 0 4

Hello

 

I would like to center the add to cart, and make the quantity box and the add to cart box same size. 

 

Make it centered not stuck to the picture on the bottom? Picture attached and this is the link to my website www.mylittleworld.shop

 

Thanks a for the help!

Thanks a lot!
Replies 28 (28)

KetanKumar
Shopify Partner
37469 3664 12132

@mylittleworld 

yes, please try this code

1. Go to Online Store->Theme->Edit code
2. Asset->/theme.css ->paste below code at the bottom of the file.

 

.product-card + form {
    text-align: center;
    margin-bottom: 30px;
}

.product-card + form input.btn {
    width: 97%;
    margin-top: 10px;
}

 

If helpful then please Like and Accept Solution. Partnership of your ️ Coffee Tips and my code can bring miracles.
Want to modify or custom changes on store Hire Me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
mylittleworld
Excursionist
36 0 4

It doesn't change anything 😞

Thanks a lot!

dmwwebartisan
Shopify Partner
12344 2554 3738

@mylittleworld 

1. Go to Online Store->Theme->Edit code
2. Asset->/theme.css ->paste below code at the bottom of the file.

.product-card + form {
    text-align: center;
    margin-bottom: 30px;
}

.product-card + form input.btn {
    width: 97%;
    margin-top: 10px;
}

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | #1 Product Filter & Search app on Shopify | The most powerful Shopify page builder app
mylittleworld
Excursionist
36 0 4

@dmwwebartisan @KetanKumar  it doesn't change anything. 

also how can I align all the quantities no matter how long the product name is?

 

Thanks for the help!

Thanks a lot!
KetanKumar
Shopify Partner
37469 3664 12132

@mylittleworld 

sorry i can't see code where did you add this code?

If helpful then please Like and Accept Solution. Partnership of your ️ Coffee Tips and my code can bring miracles.
Want to modify or custom changes on store Hire Me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
Zworthkey
Shopify Partner
5581 641 1581

@mylittleworld 
Kindly provide us  collaboration access. so that we can help you to fix it.

mylittleworld
Excursionist
36 0 4

Can you ask for a collaboration request via your Shopify partner account?

Thanks a lot!
Zworthkey
Shopify Partner
5581 641 1581

yes,

Zworthkey
Shopify Partner
5581 641 1581

@mylittleworld 
provide Collaborator request code

mylittleworld
Excursionist
36 0 4

you can request access

Thanks a lot!
Zworthkey
Shopify Partner
5581 641 1581

@mylittleworld 
Yes, I need collaboration code to request access.

Zworthkey
Shopify Partner
5581 641 1581

Screenshot (19).png

mylittleworld
Excursionist
36 0 4

there

Screen Shot 2022-01-31 at 11.17.17 AM.png

 @KetanKumar  

Thanks a lot!

DelightCart
Shopify Partner
1264 83 157

Please open theme.css and find below class.

 

.btn {

Width: auto;

}

 

Instead of auto with set the it with below.

 

.btn {

Width: 241px;

}

Delight Cart - It's time to turn your visitors into loyal shoppers! 

Delight Loyalty - Increase repeat sales quickly and build lifelong customers loyalty.

DelightCart
Shopify Partner
1264 83 157

@mylittleworld 

 

Open the theme.css and find this class .btn

 

Change with from

 

width:auto;

 

to

 

width: 240px;

 

 

Delight Cart - It's time to turn your visitors into loyal shoppers! 

Delight Loyalty - Increase repeat sales quickly and build lifelong customers loyalty.
mylittleworld
Excursionist
36 0 4

Hi, I want to make quantity and add to cart on the same line @DelightCart 

Thanks a lot!
DelightCart
Shopify Partner
1264 83 157

Ok, Go to theme.css

 

You have to add the width as below.

 

 

input, textarea, select, .disclosure__toggle {

Width:80px;
}

 

 

Delight Cart - It's time to turn your visitors into loyal shoppers! 

Delight Loyalty - Increase repeat sales quickly and build lifelong customers loyalty.
mylittleworld
Excursionist
36 0 4

nop still nothing @DelightCart 

Thanks a lot!
DelightCart
Shopify Partner
1264 83 157

It should work. See attachment.

Delight Cart - It's time to turn your visitors into loyal shoppers! 

Delight Loyalty - Increase repeat sales quickly and build lifelong customers loyalty.
mylittleworld
Excursionist
36 0 4

where should I put it? maybe there's another code that is more important and that's why its not doing it? @DelightCart 

Thanks a lot!
DelightCart
Shopify Partner
1264 83 157

You have to find the class on theme.css and just you have to add width auto to what i provided 80px;

Delight Cart - It's time to turn your visitors into loyal shoppers! 

Delight Loyalty - Increase repeat sales quickly and build lifelong customers loyalty.
mylittleworld
Excursionist
36 0 4

which class? @DelightCart 

Thanks a lot!
DelightCart
Shopify Partner
1264 83 157

Class name is below.

 

input, textarea, select, .disclosure__toggle
Delight Cart - It's time to turn your visitors into loyal shoppers! 

Delight Loyalty - Increase repeat sales quickly and build lifelong customers loyalty.
mylittleworld
Excursionist
36 0 4

found it! it adjusted it on one but not on the other @DelightCart   

here is a photo

 

Screen Shot 2022-01-31 at 12.38.56 PM.png

Screen Shot 2022-01-31 at 12.38.08 PM.png

Thanks a lot!
DelightCart
Shopify Partner
1264 83 157

Ok, Set with 40px instead of 80px.

Delight Cart - It's time to turn your visitors into loyal shoppers! 

Delight Loyalty - Increase repeat sales quickly and build lifelong customers loyalty.
mylittleworld
Excursionist
36 0 4

When I do that we can't see the number anymore @DelightCart 

Thanks a lot!
mylittleworld
Excursionist
36 0 4

@DelightCart Hi so i did all that but now the menu and search button on the header are unclickable and the logo has some grey behind it. How can i fix this? Pls help me asap

Thanks a lot!
mylittleworld
Excursionist
36 0 4

@DelightCart 

 

there is the code:

 

/*================ Buttons ================*/
.btn, .shopify-payment-button .shopify-payment-button__button--unbranded {
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
display: inline-block;
width: 150px;
text-decoration: none;
text-align: center;
vertical-align: middle;
cursor: pointer;
border: 1px solid transparent;
border-radius: 2px;
padding: 8px 15px;
margin-top: 15px;
margin-bottom: 15px;
margin-right: 15 px;
margin-left: 15 px;
background-color: var(--color-btn-primary);
color: var(--color-btn-primary-text);
font-family: var(--font-stack-header);
font-style: var(--font-style-header);
font-weight: var(--font-weight-header);
text-transform: uppercase;
letter-spacing: 0.08em;
white-space: normal;
font-size: calc(((var(--font-size-base) - 2) / (var(--font-size-base))) * 1em); }
@media only screen and (min-width: 750px) {
.btn, .shopify-payment-button .shopify-payment-button__button--unbranded {
padding: 10px 18px; } }
.btn:not([disabled]):hover, .shopify-payment-button .shopify-payment-button__button--unbranded:not([disabled]):hover, .btn:focus, .shopify-payment-button .shopify-payment-button__button--unbranded:focus {
color: var(--color-btn-primary-text);
background-color: var(--color-btn-primary-focus); }
.btn .icon-arrow-right, .shopify-payment-button .shopify-payment-button__button--unbranded .icon-arrow-right,
.btn .icon-arrow-left,
.shopify-payment-button .shopify-payment-button__button--unbranded .icon-arrow-left {
height: 9px; }
.btn[disabled], .shopify-payment-button .shopify-payment-button__button--unbranded[disabled], .btn[aria-disabled], .shopify-payment-button .shopify-payment-button__button--unbranded[aria-disabled] {
cursor: default;
opacity: 0.5; }

.btn--secondary {
background-color: transparent;
color: var(--color-btn-primary);
border-color: var(--color-btn-primary); }
.btn--secondary:not([disabled]):hover, .btn--secondary:focus {
background-color: transparent;
color: var(--color-btn-primary-focus);
border-color: var(--color-btn-primary-focus); }

.btn--secondary-accent {
background-color: var(--color-body);
color: var(--color-btn-primary);
border-color: var(--color-btn-primary); }
.btn--secondary-accent:not([disabled]):hover, .btn--secondary-accent:focus {
background-color: var(--color-body);
color: var(--color-btn-primary-focus);
border-color: var(--color-btn-primary-focus); }

.btn--small {
padding: 8px 10px;
font-size: calc(((12) / (var(--font-size-base))) * 1em);
line-height: 1; }

.btn--tertiary {
background-color: transparent;
color: var(--color-small-button-text-border);
border-color: var(--color-small-button-text-border); }
.btn--tertiary:not([disabled]):hover, .btn--tertiary:focus {
background-color: transparent;
color: var(--color-small-button-text-border-focus);
border-color: var(--color-small-button-text-border-focus); }

/*================ Button variations ================*/
@media only screen and (max-width: 749px) {
.btn--small-wide {
padding-left: 50px;
padding-right: 50px; } }

.btn--link {
background-color: transparent;
border: 0;
margin: 0;
color: var(--color-text);
text-align: left; }
.btn--link:not([disabled]):hover, .btn--link:focus {
color: var(--color-text-focus);
background-color: transparent; }
.btn--link .icon {
vertical-align: middle; }

.btn--narrow {
padding-left: 15px;
padding-right: 15px; }

.btn--has-icon-after .icon {
margin-left: 10px; }

.btn--has-icon-before .icon {
margin-right: 10px; }

 

Thanks a lot!