View Full Version : How to set the text on extjs button

19 Dec 2010, 4:50 AM
Hi all.
I got a question about button.I want to set the text on button to left not in the center.
I use css like this.

.x-btn-small .x-btn-text {
color: #FF0000;

but it doesn,t work.


19 Dec 2010, 8:38 AM
Look at it in Firebug. td.x-btn-mc

20 Dec 2010, 8:19 AM
I can,t got that!Could you please explain that more detail.

20 Dec 2010, 10:17 AM
What he's telling you is this:

If you look inside firebug you will see the button renders as a table, and that there are 3 rows and 3 columns. The middle row+column, which has class=x-btn-mc is where your button text renders to. by default this has a class style with text-align:center

You can override this and set the style to text-align left

20 Dec 2010, 6:31 PM
Animal and Foster,thank you two very much.I have made that through your help.you are awesome.