Archive for October, 2009

Image flickering bug in IE for a:hover background images

By Simon, 29 October, 2009, No Comment

Image flickering on CSS mouseover in IE is something that you come across from time to time and I came across it last night while working on a project. The problem was I had a “on the tip of my tongue” moment and couldn’t remember what I needed to do to resolve it. As with most IE bugs there are multiple solutions to the same problem but I couldn’t remember the simplest method and the one which doesn’t involve JS or other equally nasty fixes. A quick break to get a drink and the solution popped back into my head. This post is to remind me in the future and to hopefully help you now:

Problem:
In IE ( it was doing it in 6,7 and 8 ) when I hovered over the image (in this case it was a PNG image) the image would either flicker or disappear completely for half a second before coming back. The image rollover was a background image due to requiring other content inside the div.

Solution:
I needed to add the background image to both the parent element AND the child element (in this case the DIV and A tags).

This will work in any situation whether it be a list item, a paragraph or in this case a div. An example is:

#divname {background-image: url(img/yourimage.png);height: 100px; width: 100px;}
#divname a {background-image: url(img/yourimage.png);height: 100px; width: 100px;}
#divname a:hover {background-image: url(img/yourhoverimage.png);height: 100px; width: 100px;}

You could also cut down the problem code by simply doing:

#divname, #divname a {background-image: url(img/yourimage.png); height: 100px; width: 100x;}

I have stripped out all the excess (but needed) code just to show you the relevant code to this specific problem.

By adding it to both elements when IE wants to flicker the fact the parent element also has the same image in the same place prevents the flicker because the same image sits behind the child element. IE’s cache is still (incorrectly) refreshing but you can’t see it anymore thanks to the same image sitting behind it.

It isn’t an ideal solution but it is better than many out there. At least it uses the same image so the browser doesn’t have much more to load.

Free Microsoft products for small businesses…

By Simon, 9 October, 2009, 1 Comment

WebsiteSpark is designed for independent web developers and web development companies that build web applications and web sites on behalf of others. It enables you to get software, support and business resources from Microsoft at no cost for three years, and enables you to expand your business and build great web solutions using ASP.NET, Silverlight, SharePoint and PHP, and the open source applications built on top of them.
What does the program provide?

WebSiteSpark provides software licenses that you can use for three years at no cost. Once enrolled, you can download and immediately use the following software from Microsoft:

* 3 licenses of Visual Studio 2008 Professional Edition
* 1 license of Expression Studio 3 (which includes Expression Blend, Sketchflow, and Web)
* 2 licenses of Expression Web 3
* 4 processor licenses of Windows Web Server 2008 R2
* 4 processor licenses of SQL Server 2008 Web Edition
* DotNetPanel control panel (enabling easy remote/hosted management of your servers)

Click here to visit the Microsoft WebsiteSpark programme.