- Kollermedia.at - http://www.kollermedia.at -
Easy CSS Tooltip
Posted By Jürgen Koller On 24. März 2008 @ 0:29 In Scripts etc. | 159 Comments
If you need a really simple and basic Crossbrowser Tooltip on your website, this <1kb tooltip CSS script might be the one for you.
Here is the 4 line magic (3lines css, 1line html):
a:hover {background:#ffffff; text-decoration:none;} /*BG color is a must for IE6*/
a.tooltip span {display:none; padding:2px 3px; margin-left:8px; width:130px;}
a.tooltip:hover span{display:inline; position:absolute; background:#ffffff; border:1px solid #cccccc; color:#6c6c6c;}
Easy <a class="tooltip" href="#">Tooltip<span>This is the crazy little Easy Tooltip Text.</span></a>.
If you want to display a tooltip for a link, just add the class "tooltip" to the link and write your Tooltip Text in a span tag within the a tag - thats it.
Easy TooltipThis is the crazy little Easy Tooltip Text. [1].
IE5, IE 5.5, IE 6, IE7, Safari 3.1, Latest Firefox & Opera Version.
Easy CSS Tooltip [2] (690 bytes, 23.418 hits)
Article printed from Kollermedia.at: http://www.kollermedia.at
URL to article: http://www.kollermedia.at/archive/2008/03/24/easy-css-tooltip/
URLs in this post:
[1] TooltipThis is the crazy little Easy Tooltip Text.: #
[2] Easy CSS Tooltip: http://www.kollermedia.at/?dl_name=easy_css_tooltip.zip
Click here to print.
Copyright © Kollermedia.at. All rights reserved.