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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

CSS for Text Input Widget

atifkhan
11-Garnet

CSS for Text Input Widget

What are the CSS scripts for the "Text Input" Widget.

I have the label position set to 'Stacked Label' and I am trying to change the colour of the label text color and text color.

 

At the moment I am using:

.dataLabel {
  background-color : #346596;
  font-weight : bold;
  color : #FFF;  
}
  

The background color and font weight works fine, but the color (font color) does not work. 

Is there anything specific I am mising?

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
ytella
17-Peridot
(To:atifkhan)

Hi Atif,

 

Thanks for sharing the screenshot. Please use the below code to change the color of the label:

 

.dataLabel .input-label {
color: #FFF;
}

 

Let me know if this works.

View solution in original post

4 REPLIES 4
ytella
17-Peridot
(To:atifkhan)

Hi @atifkhan,

I have used the below code to change the color of the text:

.dataLabel {
background-color : #346596;
font-weight : bold;
}

.dataLabel input {
color: #FFF;
}

 

This is one of the ways to achieve the functionality. Please let me know if this works.

 

atifkhan
11-Garnet
(To:ytella)

Thanks @ytella

 

This is half of what I need, using this method changes the text inside the text input but I still cannot get the 'Label' to change font color.

As shown in the screenshot, the text (43%) is showing white, but the label input (Target) is still black.  ThingWorx Studio - Text Input.png

 

Thanks,

Atif

ytella
17-Peridot
(To:atifkhan)

Hi Atif,

 

Thanks for sharing the screenshot. Please use the below code to change the color of the label:

 

.dataLabel .input-label {
color: #FFF;
}

 

Let me know if this works.

atifkhan
11-Garnet
(To:ytella)

Thanks @ytella, thats perfect.

 

Much appreciated,

Atif

 

 

Top Tags