Text losing it's formatting

Solved

Text losing it's formatting

TBS2023
Shopify Partner
274 1 30

Hello

I have written a product description, even added the <br> in html in order to get space between the paragraphs

When you open the product - it first appears with the line spacing then it disappears?

https://yogaspirit.mu/products/debardeur-lou-blanc-et-doree

Can anyone help

Thanks

 

Accepted Solution (1)

rajweb
Shopify Partner
652 56 127

This is an accepted solution.

Hey @TBS2023 ,

If you find that existing styles are removing the spacing, you can add custom CSS to restore it.

Follow these steps:

1. Go to Online Store > Themes > Edit Code 

2. Find the Assets folder and open the file named theme.scss.liquid or similar (it might have a different name depending on your theme).

3. Add the following CSS at the bottom of the file:

 

.product__description p {
    margin-bottom: 1.5em; /* Adjust the value as needed */
    line-height: 1.5; /* Optional: adjust line height for better readability */
}

 

Test Javascript&colon;

if you suspect JavaScript might be modifying styles after the initial load, check for any scripts that run after the page loads. Look in the theme.js or other relevant JS files for any code that could manipulate styles or remove spacing.

 

After making any changes, be sure to clear your browser's cache or check in an incognito window to see if the changes have taken effect.

 

If I was able to help you, please don't forget to Like and mark it as the Solution!

Best Regard,

Rajat Sharma

 

-Need a Shopify developer?
https://rajatweb.dev/

Email: rajat.shopify@gmail.com

View solution in original post

Replies 2 (2)

rajweb
Shopify Partner
652 56 127

This is an accepted solution.

Hey @TBS2023 ,

If you find that existing styles are removing the spacing, you can add custom CSS to restore it.

Follow these steps:

1. Go to Online Store > Themes > Edit Code 

2. Find the Assets folder and open the file named theme.scss.liquid or similar (it might have a different name depending on your theme).

3. Add the following CSS at the bottom of the file:

 

.product__description p {
    margin-bottom: 1.5em; /* Adjust the value as needed */
    line-height: 1.5; /* Optional: adjust line height for better readability */
}

 

Test Javascript&colon;

if you suspect JavaScript might be modifying styles after the initial load, check for any scripts that run after the page loads. Look in the theme.js or other relevant JS files for any code that could manipulate styles or remove spacing.

 

After making any changes, be sure to clear your browser's cache or check in an incognito window to see if the changes have taken effect.

 

If I was able to help you, please don't forget to Like and mark it as the Solution!

Best Regard,

Rajat Sharma

 

-Need a Shopify developer?
https://rajatweb.dev/

Email: rajat.shopify@gmail.com

Tech_Coding
Shopify Partner
514 132 131

Hello @TBS2023 

You can add code by following these steps

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file

3. Paste the below code before </body> on theme.liquid
<style>
  .product__description.rte.quick-add-hidden p {
      line-height: 23px !important;
   }
</style>

Tech_Coding_0-1729497482338.png


my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.

 

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Shopify UI Developer
Your Coffee Tips adds a little sweetness to my day.