sprites?

A place for posting requests and information about images used in the menu.
Post Reply
mfedder
Beginner
Beginner
Posts: 9
Joined: Sat Sep 09, 2006 2:16 pm

sprites?

Post by mfedder » Thu Sep 23, 2010 7:35 pm

Is it possible to use sprites with Milonic menus?

-Michael

User avatar
Andy
Milonic
Milonic
Posts: 3307
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Re: sprites?

Post by Andy » Sat Oct 02, 2010 10:14 am

What do you mean by sprites?

mfedder
Beginner
Beginner
Posts: 9
Joined: Sat Sep 09, 2006 2:16 pm

Re: sprites?

Post by mfedder » Sat Oct 02, 2010 5:13 pm

Andy:

Sprites are compilations of multiple images into one physical file. They are used to improve web site performance by decreasing the number of requests for image files. For example, let's say it's feasible to use just one sprite containing 30 images, a single GET loads all images for the page so there's no need to pre-load images. Once the sprite file is loaded into memory, you access the separate images using the background-position CSS property or a background spec like so:

Code: Select all

background:url("../images/ui-icons_888888_256x240.png") no-repeat scroll -31px -15px #FFFFFF;
For our Intranet (School Information System), I load 33 images, each image creating a separate request to the server. When accessed from external locations, https encryption and Internet latencies slow down site performance. Through the use of sprites, I could to reduce the image loads to no more than 2 requests. However, I don't see a way to position the image correctly in a milonic menu specification. BTW, we have the site properly configured for caching but, for the first connection to a site, some browsers still make full GET requests (response = 200 OK ) rather than looking to cache (response = 304 not modified).

In our ASP app, I'm generating a menu dynamically using lines similar to this:

Code: Select all

Response.write "aI(""text=Attendance;image=""+imgs[8].src+"";url="&target&";"");"
I want to replace imgs[8].src with a positioned sprite image. I'm thinking css might get me there but I don't know how to bind a css selector to one single menu item.

-Michael

User avatar
Andy
Milonic
Milonic
Posts: 3307
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Re: sprites?

Post by Andy » Wed Oct 13, 2010 12:07 am

Hi,

Do you have an image file that I can use to create a menu based on sprites?

I'll see what we can do

-- Andy

Post Reply