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

[Solved] Many images -- any way to use CSS Sprites?

2 Answers 127 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 21 Apr 2009, 03:19 PM
Your combo box has enabled us to provide a better solution for our customers by letting them see color swatches and search all products of that color -- it's very cool.

One issue however is that since the combo is rendered on the client side, all the color swatches download the first time to the user's browser cache.  This can be up to 250 images and takes quite a bit of time.

I've been reading about CSS Sprites (where I could combine the images into a several composite images and then slice them out using CSS).

Has anyone achieved this with the rad combo?

I tried setting a new CSS file and adding a different class to each RadComboBoxListItem that is rendered with a li.colorclassname tag, but then control doesn't seem to be applying it.

I thought I could set the url of the image to the composite image and then using the CSS could position the view to just the swatch I want to show.

Thoughts?

2 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 22 Apr 2009, 10:08 AM
Hello Kevin,

As far as I understand, you wish to use "sprited" images in the RadComboBox drop-down. You can find attached a sample solution that shows such behavior; if I'm wrong about your scenario, please provide further explanation.

Sincerely yours,
Alex
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Kevin
Top achievements
Rank 1
answered on 22 Apr 2009, 02:26 PM
150% PERFECT!!!

THANK YOU!
Tags
ComboBox
Asked by
Kevin
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Kevin
Top achievements
Rank 1
Share this question
or