White Space issue | Community
Skip to main content
April 8, 2022
Solved

White Space issue

  • April 8, 2022
  • 1 reply
  • 1162 views
Hi On live page I have small white space left between container and border. I want to fix it by adding background color. How to do that in css. Thanks in advance!
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Prince_Shivhare

Hi Sneha,

Is it specific to CSS? if yes there are plenty of examples available on google. for instance check below one -

https://www.w3schools.com/css/css_background.asp

Apart from this, if you are writing some custom HTL in components so please make sure you use the <sly> tag. <div> tag creates a extra space.

Thank you,

Prince

1 reply

Prince_Shivhare
Community Advisor
Prince_ShivhareCommunity AdvisorAccepted solution
Community Advisor
April 8, 2022

Hi Sneha,

Is it specific to CSS? if yes there are plenty of examples available on google. for instance check below one -

https://www.w3schools.com/css/css_background.asp

Apart from this, if you are writing some custom HTL in components so please make sure you use the <sly> tag. <div> tag creates a extra space.

Thank you,

Prince

PhaniRajuTanneru
Level 2
April 8, 2022

Below is the keywords for trim the white space using css.

/* Keyword values */
white-space: normal;
white-space: nowrap;
white-space: pre;
white-space: pre-wrap;
white-space: pre-line;
white-space: break-spaces;