View Full Version : setStyle('padding-bottom', 20) not working

15 Oct 2012, 8:38 AM
I'm calling this function to set the padding-bottom of a label, but its not working:

Ext.getCmp('myLabel').getEl().setStyle('padding-bottom', 20);

Tried this as well, but no luck"

Ext.getCmp('myLabel').getEl().setStyle('paddingBottom', 20)

15 Oct 2012, 3:40 PM
Try it with units:

Ext.getCmp('myLabel').getEl().setStyle('padding-bottom', '20px')

Note that setting the padding on an element independently of the layout system can have unpredictable results but nevertheless it should set the padding for that element.