WinHQ.org website - CSS preloading

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Arite
Newbie
Newbie
Posts: 1
Joined: Tue Jul 28, 2009 12:01 pm

WinHQ.org website - CSS preloading

Post by Arite »

Hi,

I wasn't sure where to write this so thought I'd just put it in the forum. The WineHQ.org website is great, just I think pre-loading the hover images for the main menu section would make the site even better as it would no longer mean the hover images would need to be loaded when the mouse is hovered over them.

I found a solution here:
http://www.maratz.com/blog/archives/200 ... es-in-css/

So, currently the CSS is e.g. as follows:

Code: Select all

ul.winehq_menu li.info             { background-image: url('images/main_info.png'); background-repeat: no-repeat }
ul.winehq_menu li.info:hover       { background-image: url('images/main_info_s.png'); background-repeat: no-repeat }
And instead doing something like:

Code: Select all

ul.winehq_menu li.info             { background-image: url('images/main_info_s.png'); background-repeat: no-repeat }
ul.winehq_menu li.info:link        { background-image: url('images/main_info.png'); background-repeat: no-repeat }
ul.winehq_menu li.info:hover       { background-image: url('images/main_info_s.png'); background-repeat: no-repeat }
Should hepofully preload the images (haven't tested it out though).

Cheers, Arite.
DaVince
Level 8
Level 8
Posts: 1099
Joined: Wed Oct 29, 2008 4:53 pm

Post by DaVince »

I tested it using the Firebug extension for Firefox, seems to work fine. You'll likely want to file this as a bug report over at bugs.winehq.org.
Locked