Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
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

2 Replies

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

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;