cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

I am facing problem in providing color to text in label widget using css code .

Participant

I am facing problem in providing color to text in label widget using css code .

I am facing problem in providing color to text in label widget using CSS code .i WILL PROVIDE THE CODE BELOW :

 

.simple-label {
width: auto;
height: auto;
display: flex;
color: red;
font-weight: 400;
line-height: 14px;
}

8 REPLIES 8

Re: I am facing problem in providing color to text in label widget using css code .

Hello,

 

Why don't you use Style property of the widget instead? If you reuse your Style objects consistently, it will be more flexible and easier to maintain in the long-run.

 

/ Constantine

Re: I am facing problem in providing color to text in label widget using css code .

Hi,

 

This will work (change CSS class in label widget):

 

.label-text {
width: auto;
height: auto;
display: flex;
color: red;
font-weight: 400;
line-height: 14px;
}

 

Best regards,

Raluca Edu

Re: I am facing problem in providing color to text in label widget using css code .

I want to try it using CSS code.Please give me some suggestions

Re: I am facing problem in providing color to text in label widget using css code .

No .it did not work if i change the css class too

Re: I am facing problem in providing color to text in label widget using css code .

In 8.4.4 worked, what version are you using?

Re: I am facing problem in providing color to text in label widget using css code .

8.4 version

Re: I am facing problem in providing color to text in label widget using css code .

Please attach xml export of simple mashup to look into.

 

Thanks,

Raluca Edu

Highlighted

Re: I am facing problem in providing color to text in label widget using css code .

@sanjanabalaji In your original example, add ".label-text" to the CSS selector like that:

.simple-label .label-text {
    width: auto;
    height: auto;
    display: flex;
    color: red;
    font-weight: 400;
    line-height: 14px;
}

The custom CSS class is applied to the DIV, which encloses the SPAN with "label-text" (not to the SPAN itself), so you need to specify an explicit CSS selector to override "label-text" parameters (dark-gray color, bold, etc.)

 

/ Constantine