Re: trying to align text & button wide apart

Solved

trying to align text & button wide apart

Tranquilo
Shopify Partner
7 0 1

I'd like the text to be aligned on the left side and the button to be placed on the right side.

 

Can someone please help me how to get there?

Accepted Solution (1)
Made4uo-Ribe
Shopify Partner
6984 1662 2052

This is an accepted solution.

Hi @Tranquilo 

Check this one. 

From your Shopify admin dashboard, click on "Online Store" and then "Themes".

Find the theme that you want to edit and click on "Actions" and then "Edit code".

In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

h2.rich-text__heading.rte.inline-richtext.h1 {
    text-align: left !important;
}
.rich-text__text.rte {
    margin: 0px !important;
}
.rich-text__blocks.center {
    display: flex;
    max-width: 100%;
    justify-content: space-between !important;
}
.rich-text__buttons {
    justify-content: right;
    margin-top: 0px !important;
    max-width: fit-content !important;
}
.rich-text__wrapper {
    max-width: 100%;
}

 

And Save. 

Result:

Made4uoRibe_0-1715693565847.pngMade4uoRibe_1-1715693578133.png

 

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.

View solution in original post

Replies 9 (9)

Tranquilo
Shopify Partner
7 0 1

Schermafbeelding 2024-05-14 133956.png

swym
Explorer
62 7 23

Hey @Tranquilo

Can you please share the site URL so that I can review the theme structure and share a solution as per the theme structure?

 

Regards, 

Abhishek from Swym

- Appreciate the assistance. Show your approval with a Like! And when your question finds its answer, seal the deal by marking it as an Accepted Solution!
- Our Solutions: Wishlist Plus | Swym Back in Stock Alerts | Swym Gift Lists and Registries
Made4uo-Ribe
Shopify Partner
6984 1662 2052

This is an accepted solution.

Hi @Tranquilo 

Check this one. 

From your Shopify admin dashboard, click on "Online Store" and then "Themes".

Find the theme that you want to edit and click on "Actions" and then "Edit code".

In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

h2.rich-text__heading.rte.inline-richtext.h1 {
    text-align: left !important;
}
.rich-text__text.rte {
    margin: 0px !important;
}
.rich-text__blocks.center {
    display: flex;
    max-width: 100%;
    justify-content: space-between !important;
}
.rich-text__buttons {
    justify-content: right;
    margin-top: 0px !important;
    max-width: fit-content !important;
}
.rich-text__wrapper {
    max-width: 100%;
}

 

And Save. 

Result:

Made4uoRibe_0-1715693565847.pngMade4uoRibe_1-1715693578133.png

 

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
Tranquilo
Shopify Partner
7 0 1

Thank you!

Made4uo-Ribe
Shopify Partner
6984 1662 2052

Welcome! 😊

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.

Moeed
Shopify Partner
4383 1131 1389

Hey @Tranquilo 

 

Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.

 

Best Regards,
Moeed

Need a Shopify Specialist? Chat on WhatsApp


- Custom Design | Advanced Coding | Store Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
Tranquilo
Shopify Partner
7 0 1

Thank you Moeed!

 

https://tranquilo.store/

Sandeep81
Shopify Partner
118 17 19

Hi Tranquilo,

tranquilo.store_.png

Do you want to like that?

Hey if it works, please give a Like or mark it as a solution.
Please Let me Know if not solved.
Here I am: sandeepkhandagade@gmail.com
Thanks & Regards
Sandeep

swym
Explorer
62 7 23

Hey @Tranquilo

Thanks for sharing your store URL, and after reviewing I noticed that the structure you're displaying is implemented using a rich text section in your theme.

 

To address your query about aligning the title to the left-hand side and the button on the right, kindly follow the steps outlined below:

1. Open the code editor, as shown in the screenshot below.

swym_0-1715692439005.png

 

2. Create a snippet called ‘custom-styles’ and add the below code: 

 

 

<style>
@media only screen and (min-width: 990px) {
  .rich-text__blocks {
    display: flex;
    justify-content: space-between;
    max-width: 100%; 
  }
  .rich-text__blocks .rich-text__buttons {
    justify-content: right;
  }
}
</style>

 

 

3. Include the ‘custom-styles.liquid’ file in your “theme.liquid” file.
Add the following include code to your theme.liquid file.

 

 

{% render 'custom-styles' %}

 

 

It would look something like below:

swym_1-1715692601484.png

4. Done? Now save the file, and try previewing to confirm if the changes work for you.  In the reference above, it looks something like below:

swym_2-1715692701482.png

 

 

I hope this helps!

Regards,
Abhishek from Swym 

 

 

- Appreciate the assistance. Show your approval with a Like! And when your question finds its answer, seal the deal by marking it as an Accepted Solution!
- Our Solutions: Wishlist Plus | Swym Back in Stock Alerts | Swym Gift Lists and Registries