This is a migrated thread and some comments may be shown as answers.

CSS Sprite

2 Answers 75 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Teodorico
Top achievements
Rank 1
Teodorico asked on 12 Mar 2010, 03:15 AM

Hi,
Is it possible to have a single image (sprite) and load the individual button images using CSS?

I have tried using .rtbIcon, but if the property ImageUrl is not set on the button, the element <img class="rtbIcon" .../> is not rendered.

 

Thanks.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Mar 2010, 07:45 AM

Hello Teodorico,

I hope the following documentation links would be helpful in start off.

CSS Skin File Selectors

CSS sprites

Also I found the following link which explains how to use sprite image to show different images. I hope this will give you some insights on using CSS sprites.

http://www.lightpostcreative.com/image-sprites-tutorial/

-Shinu.

0
T. Tsonev
Telerik team
answered on 12 Mar 2010, 04:03 PM
Hello,

We plan to introduce sprite support for the Q2 2010 release, but for the moment using the .rtbImage element is the best solution. You have to set the ImageUrl to point to 1x1 transparent image and use CSS to set its size and background from the sprite.

I hope this helps.

Best wishes,
Tsvetomir Tsonev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ToolBar
Asked by
Teodorico
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
T. Tsonev
Telerik team
Share this question
or