How can I center text and view product button on mobile view?

How can I center text and view product button on mobile view?

unfoldesthetics
Tourist
26 0 2
Hello, 
 
In mobile view, I'd like for the text, rating, price, and view product button to be centered and fit within its product, as it looks like it spills over to the next one. 
 
I would appreciate any help! 
 
IMG_0189.jpeg

Replies 9 (9)

theycallmemakka
Shopify Partner
1785 435 462

Can you provide me the link to your store?

 

Support Me: Buy me a Coffee


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com

unfoldesthetics
Tourist
26 0 2

https://unfoldesthetics.com/collections/online-courses

Password:rejie

 

I attempted to do something similar to a quick add. But, I wanted to change quick add to view product instead. So I added this coding according to this person's instructions.

 

https://community.shopify.com/c/shopify-design/changing-all-add-to-cart-buttons-to-view-more/m-p/208...

 

The issue I'm having is the button is not centered and the texts are all weird.

 

theycallmemakka
Shopify Partner
1785 435 462

The page is showing too many failed attempts.

makkaomakka_0-1698726952549.png

 

Support Me: Buy me a Coffee


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com

unfoldesthetics
Tourist
26 0 2

I removed the password temporarily for now so you can see.

theycallmemakka
Shopify Partner
1785 435 462

Hi @unfoldesthetics ,

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>

@media only screen and (max-width: 600px) {
  .card__information.card__heading--price {
    width: 100%!important;
    max-width: 100%!important;
}

.card__information.card__heading--price {
    display: flex!important;
    flex-direction: column!important;
    align-items: center!important;
}

a.card__view-product.button.button--secondary {
    padding: 0px!important;
    text-transform: capitalize;
    margin-top: 5px;
}

#shopify-section-template--20828773384500__e13f5fd6-cad5-4300-8b68-1bb3eeaa3488 .card__heading {
    font-size: 15px!important;
}

.price {
    margin-top: 5px!important;
}

h3#title-template--20828773384500__e13f5fd6-cad5-4300-8b68-1bb3eeaa3488-8599231660340 {
    margin-bottom: 5px!important;
}
}
</style>

 

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,

Makka

Support Me: Buy me a Coffee


For quick response - Message Me


Ping me at: theycallmemakka@gmail.com

unfoldesthetics
Tourist
26 0 2

Thank you!

 

Could you please rewrite another code to just recenter the button and fix the texts basically im trying to set it up like this. Could you please have it be like this for both desktop and mobile? I realize the button isn't centered on desktop either.

Screenshot 2023-10-30 at 9.52.27 PM.png

oscprofessional
Shopify Partner
16233 2427 3153

Hello @unfoldesthetics 

 

 

You can try this code: it will be helpful to you

Go to the Online Store->Theme->Edit code->Assets->base.css>Add this code at the bottom.

.card__heading--price {
    align-items: center !important;
}

 

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing | Oscp Upsell & Cross sell App : Free | Oscp Sales & Volume Discount App : Free | Custom Pricing Wholesale App : Free | OSCP Shipping Discounts App : Free

Dan-From-Ryviu
Shopify Partner
10868 2142 2277

Hi @unfoldesthetics 

Please share your store link 

- Solved it? Hit Like and Accept solution! ❤️Buy Me Coffee❤️
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

unfoldesthetics
Tourist
26 0 2

https://unfoldesthetics.com/collections/online-courses

Password:rejie

 

I attempted to do something similar to a quick add. But, I wanted to change quick add to view product instead. So I added this coding according to this person's instructions.

 

https://community.shopify.com/c/shopify-design/changing-all-add-to-cart-buttons-to-view-more/m-p/208...

 

The issue I'm having is the button is not centered and the texts are all weird.