PDA

View Full Version : Buttons With Icons from Sprite



jwendt
8 Apr 2010, 12:47 PM
I'm trying to add Icons to buttons with sprites.

I have tried several contortions to get this working.

Doesn't work.


.icon-icon {
border: 0;
height: 16px;
width: 16px;
background-image: url(../images/icons/icons.png) !important;
background-repeat: no-repeat !important;
}
.icon-link_user {
background-position: -2px -2px !important;
}



this.accept = new Ext.Button({
scope: this
,iconCls: 'icon-icon icon-link_user'
,renderTo: 'panel'
});


If anyone has a solution I would love to see it.

estesbubba
8 Apr 2010, 1:45 PM
Do you need to give height & width on your background-position? Here is what I've done.

.ecxp-standard .navigateSprite { background: url(images/navigateSprite.png) no-repeat top left; }
.ecxp-standard .navigateFirst { background-position: 0 0; width: 16px; height: 16px; }