Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

White Space issue

Avatar

Level 1
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!
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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

Avatar

Level 2

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;