cancel
Showing results for 
Search instead for 
Did you mean: 

ObjectAttribute apply CSS

Murali_Shanmu
Active Contributor
0 Kudos

Hi,

I have an ObjectListItem control which displays a collection. I am trying to make the ObjectAttribute "ATTR1" in red color. I tried using CSS, accessing Dom reference etc..COuldnt get anything to work.

Any suggestions on how I can make ObjectAttribute ATTR1 display in red color ?

Regards,

Murali.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182862
Active Contributor
0 Kudos

HI Murali

You can addStyleClass like this

JS Bin - Collaborative JavaScript Debugging

Murali_Shanmu
Active Contributor
0 Kudos

Hi Dennis,

Thanks.

I gave the below entry in my CSS

.democss {

  color : #FF0000 !important;

}

and referenced this sytle inside the view - both in after nad Before rendering

this.byId("ATTR1").addStyleClass("democlass");

It still didnt work.

former_member182862
Active Contributor
0 Kudos

.democss and then you have it as democlass? 🙂

Murali_Shanmu
Active Contributor
0 Kudos

lol. My brain stopped working Thanks.

Answers (1)

Answers (1)

saivellanki
Active Contributor
0 Kudos

Hi Murali,


Try this in your CSS -


#ATTR1-text{

  color:#ff0000;

}

Check a sample here: JS Bin - Collaborative JavaScript Debugging

Regards,

Sai Vellanki.

Murali_Shanmu
Active Contributor
0 Kudos

Thanks,

I am using a CSS file with the below entry. I have loaded the CSS file in the init() of the view and can see it loaded in the Elements tab of Chrome developer trace. For some reason it doesnt work.

#ATTR1-text{   

     color : #FF0000 !important;

}