What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: trying to align text & button wide apart

Solved

trying to align text & button wide apart

Tranquilo
Shopify Partner
16 0 4

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
9179 2190 2706

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 are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Create custom Shopify pages effortlessly with PageFly's drag-and-drop ⚙️.

View solution in original post

Replies 9 (9)

Tranquilo
Shopify Partner
16 0 4

Schermafbeelding 2024-05-14 133956.png

swym
Trailblazer
157 33 73

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
9179 2190 2706

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 are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Create custom Shopify pages effortlessly with PageFly's drag-and-drop ⚙️.
Tranquilo
Shopify Partner
16 0 4

Thank you!

Made4uo-Ribe
Shopify Partner
9179 2190 2706

Welcome! 😊

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
Create custom Shopify pages effortlessly with PageFly's drag-and-drop ⚙️.

Moeed
Shopify Partner
6367 1725 2088

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

- Get a quick Shopify quote – Click here!

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


Tranquilo
Shopify Partner
16 0 4

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
Trailblazer
157 33 73

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