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
5951 1432 1766

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!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
For FREE, premium codes, and trusted, knowledgeable Shopify developers, visit us at

Made4uo.com


View solution in original post

Replies 9 (9)

Tranquilo
Shopify Partner
7 0 1

Schermafbeelding 2024-05-14 133956.png

swym
Excursionist
39 0 10

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

Made4uo-Ribe
Shopify Partner
5951 1432 1766

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!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
For FREE, premium codes, and trusted, knowledgeable Shopify developers, visit us at

Made4uo.com


Tranquilo
Shopify Partner
7 0 1

Thank you!

Made4uo-Ribe
Shopify Partner
5951 1432 1766

Welcome! 😊

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
For FREE, premium codes, and trusted, knowledgeable Shopify developers, visit us at

Made4uo.com


Moeed
Shopify Partner
3793 958 1189

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 developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom 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
115 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
Excursionist
39 0 10

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