Text aligning in CSS in widget

sri vijaya
Tera Contributor

Hi

How to arrange the text alignment correctly within the background color in css in widget configuration ,Given the expected and actual screenshots below 

CSS in widget i have given :

div {

background-color : lightblue;

width :auto;

height:100px;

}

 

 

Actual output:

srivijaya_0-1714375835302.png

Expected output:

srivijaya_1-1714375912359.png

Please help me to resolve this issue

@Dr Atul G- LNG @James Chun @Community Alums 

 

 

 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @sri vijaya ,

You can use below CSS property it will work

word-break: break-word;

 

div {

background-color : lightblue;
word-break: break-word;
width :auto;
fonr-weight: bold;
height:100px;
padding: 15px
}

 

Result 

SarthakKashya2_0-1714376893242.png

 

 

Please mark my answer correct and helpful if this works for you

 

Thanks and Regards 

Sarthak

View solution in original post

1 REPLY 1

Community Alums
Not applicable

Hi @sri vijaya ,

You can use below CSS property it will work

word-break: break-word;

 

div {

background-color : lightblue;
word-break: break-word;
width :auto;
fonr-weight: bold;
height:100px;
padding: 15px
}

 

Result 

SarthakKashya2_0-1714376893242.png

 

 

Please mark my answer correct and helpful if this works for you

 

Thanks and Regards 

Sarthak