CSS Tooltips

No need of javascript to make tooltips. I got this simple css trick to make it.

CSS Code

a:hover {
background:#ffffff; /*BG color is a must for IE6*/
text-decoration:none;
}

a.mytooltip span {
display:none;
padding:2px 3px;
margin-left:8px;
width:200px;
}

a.mytooltip:hover span{
display:inline;
position:absolute;
background:#ffffff;
border:1px solid #cccccc;
color:#6c6c6c;
}

HTML Code

<a href=”#” class=”mytooltip”>Vikas Khera<span>https://vikaskhera.wordpress.com</span></a&gt;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s