PDA

View Full Version : Fieldtext background image css



jorgeluislay
10 Nov 2012, 4:47 AM
Hi!

I just want to put an image on the textfield input box but i dont know how to do this. What i got till now is this:


.myStatusFieldIcon {
background-image: url(../img/shared/icons/icon.png) no-repeat scroll 0 2px;
}

in my ExtJs code:



xtype: 'textfield',
cls: 'myStatusFieldGreen',

But i see a lot of icons.png in the box. I just want to have one icon.png on the right side of the box. Some ideas ?

jorgeluislay
10 Nov 2012, 10:19 AM
Ext.getCmp('searchField').removeClass('myStatusFieldGreen');
Ext.getCmp('searchField').addClass('myStatusFieldRed');



It works .. Resolved !