Pure CSS Tooltips

Introduction

This demo implements a common javascript feature called tooltips where hovering over a link brings up a box with further information about it. This system uses the CSS :hover specifier and local absolute positioning contents to make a box appear below the link, above other items on the page. The original code is based on the pure CSS menu at GRC which shows how to make things appear on hover even in IE6.

As near as I can tell this system works on all IEs since 6 (not tried earlier), Firefox 3.0.10, Chrome 2.0.172.28, Safari 3.1.2 and Opera 9.63. There may be some slight inconsistencies between them (Opera especially) but I'm sure they shouldn't be too hard to fix.

This page was built up from a number of separate experiments and plays, it's entirely possible it's far from optimal and could be easilly reduced by someone so inclined.

Public Domain

As with the original GRC menu this code is public domain. Acknowledgement (a link to this page) would be nice, but is not required. Use it as you see fit.

Images (mouse-over them)

Check my keys! Check my keys!
Check my keys!
This is one of them! This is one of them!
This is one of them!
WOW! A key-ring! WOW! A key-ring!
WOW! A key-ring!