View Full Version : image sprite

majid mir
24 Feb 2010, 12:07 AM
Hi Guys,

Anyone answer pls..

I have made one image sprite to merge 29 icons, which we are using in the toolbar action items... ... i'm calling these seperate classes with iconCls:''..
but is not displaying.. if i used cls:'', then it is showing.. the code

.sprite-add {background-image: url(iconsprite.gif); background-repeat:no-repeat; width: 16px; height: 16px; background-position: 0 3px;padding:0;

anybody have answer... what is the best approache to use image sprite..


24 Feb 2010, 2:58 AM
As far as I know you need to add a !important behind the background styles...
.sprite-add {
background-image: url(iconsprite.gif) !important;
background-repeat:no-repeat !important;
background-position: 0 3px !important;
width: 16px;
height: 16px;

A try

majid mir
24 Feb 2010, 3:08 AM
Thanks for your reply...

one more thing.. i need to call these classes in the toolbar action items..

by iconCls:'class name'

but it is not displaying anything.. but if i call these classes by cls:'class name'

then its display...

do u check anything in the CSS code i'm missing anything apart from imp...