PDA

View Full Version : Applying Css for Button control



sencha99999
29 Aug 2012, 6:59 AM
Hi,

I am using cls property of button control to apply custom css for button but it is applying only for maindiv of button not for inner Divs. If I add classes to inner divs also using Javascript its working fine for all browsers except IE8 or below. It seems its because of extra css classes which are adding to the control to support lower version of browsers affecting the css classes which iam adding.

How can i solve this issue?

Thanks in advance.

Regards,
Shravan

sword-it
29 Aug 2012, 11:04 PM
HI!

you may try following to add custom CSS for inner & main section of your button.

CSS:-
.myBtn{background:red !important;}
.myBtn span{background:yellow !important;color:blue !important}



{
xtype:'button'
text:"Custom CSS Button",
cls:'myBtn',
width:200
}



Output:-
38347