Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Menu Images
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:04

sprites?


Poster: mfedder
Dated: Thursday September 23 2010 - 19:35:45 BST

Is it possible to use sprites with Milonic menus?

-Michael

Re: sprites?


Poster: Andy
Dated: Saturday October 2 2010 - 10:14:21 BST

What do you mean by sprites?

Re: sprites?


Poster: mfedder
Dated: Saturday October 2 2010 - 17:13:32 BST

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:
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:
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

Re: sprites?


Poster: Andy
Dated: Wednesday October 13 2010 - 0:07:42 BST

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