1

I need to change text color of my button. I defined a css class like;

.mbutton{
    background:transparent;
    color:red;
    border:none;
}

and button definition is here;

Ext.create('Ext.Button', {
            renderTo: Ext.getBody(),
            text: 'Red text',
            cls:'mbutton'
   });

fiddle: https://fiddle.sencha.com/#fiddle/olj

2
  • You tried color: red !important;? Commented Jun 13, 2015 at 22:32
  • didn't work, I've share sample code on fiddle and update post
    – AsyncTask
    Commented Jun 13, 2015 at 22:41

1 Answer 1

3

A button is generated with span elements inside. The color need to be changed in span instead in button. Do this way:

.mbutton span{
    color:red;
}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.