Shopify themes, liquid, logos, and UX
Can anyone teach me how to justify heading text so that it has equal width on both the right and left sides? Usually, you can set the alignment to right, left, or center, but I want the text to be evenly distributed across the width. Does anyone know how to do this?
Solved! Go to the solution
This is an accepted solution.
Hi @Sheeks ,
Long time no see,
I haved checked your website on mobile view, you can try add css script in base.css :
.slideshow-heading {
text-align: justify;
font-size: 21px !important;
padding-left: 10px !important;
}
If you want the text on the slideshow to have equal width on both the right and left sides, you need to use the text-align: justify property. However, when using this property, it will automatically justify the text on both the left and right sides, adjusting the spacing based on the font size and the available space. Therefore, I added the font size attribute to display it properly.
As a result, the text displayed on the slideshow will become smaller.
The result will be:
We hope my suggestions will solved your issue.
If it is helpful, can you kindly give us likes and mark the solution for us?
'Have a nice day sir !!
If our suggestions are useful, please let us know by giving it a like, marking it as a solution.
BSS: B2B Wholesale Solution |BSS: B2B Portal, Quote, Net 30 | B: B2B Lock Password Protect
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
- Here is the solution for you @Sheeks
- Please follow these steps:
- Then find the base.css or theme.css file.
- Then add the following code at the end of the file and press 'Save' to save it.
.text-reveal-content span {
text-align: center !important;
}
- Here is the result you will achieve:
- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.
For give Gift to customers and Upsell in Cart, check out Salepify: Free Gifts with purchase
Post purchase upsell, downsell offers to improve sales and AOV
Salemate Post Purchase Upsell
Owh like that. but no
i dont want it to simply be center
i want it to set the alignment to right, left, or center, but I want the text to be evenly distributed across the width.
you can try it @Sheeks
@media only screen and (max-width: 600px) {
.text-reveal-content span {
text-align: justify !important;
font-size: 36px !important;
}
}
- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.
For give Gift to customers and Upsell in Cart, check out Salepify: Free Gifts with purchase
Post purchase upsell, downsell offers to improve sales and AOV
Salemate Post Purchase Upsell
Nice! But i wish the right gap n left gap is same. Can?
@media only screen and (max-width: 600px) {
.text-reveal-content span {
text-align: justify !important;
font-size: 36px !important;
}
.slideshow-content {
max-width: 100% !important;
padding-left: 15px !important;
padding-right: 15px !important;
}
.slideshow-content-wrapper .m-bottom-left {
left: 0 !important;
}
}
Can you try this code @Sheeks
- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.
For give Gift to customers and Upsell in Cart, check out Salepify: Free Gifts with purchase
Post purchase upsell, downsell offers to improve sales and AOV
Salemate Post Purchase Upsell
I am sorry but it look weirdly like that
This is an accepted solution.
Hi @Sheeks ,
Long time no see,
I haved checked your website on mobile view, you can try add css script in base.css :
.slideshow-heading {
text-align: justify;
font-size: 21px !important;
padding-left: 10px !important;
}
If you want the text on the slideshow to have equal width on both the right and left sides, you need to use the text-align: justify property. However, when using this property, it will automatically justify the text on both the left and right sides, adjusting the spacing based on the font size and the available space. Therefore, I added the font size attribute to display it properly.
As a result, the text displayed on the slideshow will become smaller.
The result will be:
We hope my suggestions will solved your issue.
If it is helpful, can you kindly give us likes and mark the solution for us?
'Have a nice day sir !!
If our suggestions are useful, please let us know by giving it a like, marking it as a solution.
BSS: B2B Wholesale Solution |BSS: B2B Portal, Quote, Net 30 | B: B2B Lock Password Protect
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024