Skip Site Navigation «

CSS Tooltips

vnav«labs«CSS«tooltips

This is a simple demonstration of using custom CSS tooltips as a drop-in replacement for the browser-based title attribute. No time like the present—

Everyone should visit Wikipedia!Wikipedia! on Wiki
http://www.wikipedia.org/wiki/Wiki

/* css/tooltip.css -- fancy tooltips */ span.tool { position: relative; /* this is key */ cursor: help; } span.tool span.tip { display: none; /* so is this */ } /* tooltip will display on :hover event */ span.tool:hover span.tip { display: block; z-index: 100; position: absolute; top: 2.5em; left: 0; width: auto; line-height: 1.2em; padding: 3px 7px 4px 6px; border: 1px solid #336; background-color: #f7f7ee; font-family: arial, helvetica, sans-serif; font-size: 12px; font-weight: normal; color: #000; text-align: left; } #content span.tool::after { padding-left: 2px; /* eye candy */ content: url(/img/bubble.gif); } /* css/tooltip.css */

Didn’t find what you were looking for? Try searching drx for many other helpful CSS resources.

Last updated: Tuesday, November 29th, 2005 @ 11:28 PM EST [2005-11-30T04:28:25Z]   home

(c) 2006-2008, Douglas W. Clifton, loadaveragezero.com, all rights reserved.