All things Shopify and commerce
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?
Solved! Go to the solution
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:
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
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
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:
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
Thank you!
Welcome! 😊
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
Hi Tranquilo,
Do you want to like that?
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.
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:
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:
I hope this helps!
Regards,
Abhishek from Swym
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024