PDA

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



liumingwei2009
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;
text-align:left
}


but it doesn,t work.


23885

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

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

Foster
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

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