PDA

View Full Version : remove styling property from component



sandy52
18 Jun 2014, 8:06 PM
Hi All,
I want to remove some styling property from component, like i want to remove z-index property from toolbar component, is this possible in sencha.


Thanks,
sandy

mdnaveed42
19 Jun 2014, 11:25 PM
Hi Sandy,

There are many ways of overwriting the css of sencha.

cls
(http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.AbstractComponent-cfg-cls)
style
(http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.AbstractComponent-cfg-style)
Overwrite in your custom css file
Eg:

.x-panel-body-default {
background: none;
}


Thanks,
Md Naveed
\m/

sandy52
25 Jun 2014, 11:14 PM
Yup, but sencha already provided some styling to control, i want to remove it totally from control, is that possible to style property

cmeans
28 Jun 2014, 2:08 PM
Sencha styles are almost exclusively supplied via classes.

The "style" property on an element will generally override what's in an associated class.

So, something like:



style: 'z-index: inherited'


should do the trick. You may need to include "!important".

-Chris

sandy52
30 Jun 2014, 2:34 AM
Oh!! okay thanks