PDA

View Full Version : Rotate the button label



same66
1 Feb 2011, 2:59 AM
Hi,

I'm using a button for my web application and I want to rotate the label of this button.

I just want rotate the label to 270 and I want know if is possible with extJS because I need to do that with javascript only.

I have search on the web, and with CSS3 is possible but, I can not use because my application must work with IE6 and FF.

Do you have an idea to do that ?
ExtJS allows to do that ?
Another method ?

Condor
1 Feb 2011, 4:38 AM
In IE you can use css 'writing-mode: tb-rl'.

In Firefox you can use '-moz-transform: rotate(90deg)' (I assume you don't have to support FF2?).

same66
1 Feb 2011, 5:02 AM
No it's ok, I just need IE6+ and FF3+.

I set this attribute on a listener ? On the render ?
Or you think at another time ?

Condor
1 Feb 2011, 5:17 AM
Neither. These are css properties, so you give your button a specific class (e.g. cls:'btn-vertical-text') and write css rules based on this class that specify the writing-mode and -moz-transform.

same66
1 Feb 2011, 5:57 AM
Ok it's work fine with the cls.
But, is it possible to rotate ONLY the label ?

Condor
1 Feb 2011, 5:59 AM
Make your css rule more specific.