Tuesday 27 May 2008

IE6, AlphaImageLoader, and links

I too have hit the problem where links, that are inside elements with (a) absolute positioning, and (b) a background image loaded using AlphaImageLoader, are unclickable. Yet another annoying IE6 bug!  The sooner that browser is dead, the better...

Anyway, I seem to have fixed the problem (thanks to others out there, especially Stu Nicholls and Drew McLellan, with their fix descriptions) by adding another div within the original absolute-position-and-semi-transparent-background div and to contain the link(s). This div has no use in other browsers, but in IE6 I apply the AlphaImageLoader background to that one, turning off the background-image on the original div. Since the AlphaImageLoader background is no longer applied to an absolutely-positioned element, all is well again, and links are clickable in IE6!

<div class="withbackground">
 <div>
  <a href="http://www.example.com">Link here<a>
 </div>
</div>

The normal style sheet has what you'd expect for absolute positioning and a semi-transparent PNG background image:

.withbackground {
 position: absolute;
 top: 10px;
 left: 20px;
 background-image: url(images/semi-transparent.png);
}

and then, in an IE6-only additional style sheet, we turn off the original PNG, and apply it using AlphaImageLoader to the child div, which isn't positioned:

.withbackground {
background-image: none;
}
.withbackground div {
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/semi-transparent.png', sizingMethod='image');
}

and with all that in place, the page works in every decent browser, and also in IE6!

Wednesday 21 May 2008

Eco-Eye Mini electricity consumption monitor

I have just had delivery of an Eco-Eye Mini electricity consumption monitor, and I'm very impressed.

The monitor is easy to install, just insert the batteries and clip the sensor wire around the live wire in your electricity meter cupboard. You then have a very clear read-out of your current electricity consumption in KW. You can enter the current price per unit for your electricity, and the monitor will then also be able to display the current cost per hour (or day, week, month, or year).

The monitor's output has a resolution of 10 watts, so you can see the effect of turning lights on and off, even low-energy ones.

The range of the monitor is reasonable. In our house with solid internal walls it works in most places apart from the furthest points from the transmitter. The range seems similar to that of our Speedtouch 585 v6 wireless router.

The Eco-Eye is made in the UK, and much more information about the unit is available from the manufacturer's web site: http://www.eco-eye.com

The unit is competitively priced too, and if you order from the Good Energy Shop soon you can get a 25% discount, making the monitor £33.94 including postage.

Later in the summer there should be a USB-interfacing receiver available too, with battery backup and data retention for when your computer is switched off. This listens to the same radio signals as the standard monitors, so will work nicely in parallel. Should make analysing trends in household electricity usage easy.