You are here: Home » PHP » Tooltip in php

Tooltip in php

32 Flares 32 Flares ×

Some time we have to show some message on mouse over or click on some text, it is called tooltip.
There are many ways to display data in tooltip, i am using one of it.

Use just below code for tooltip.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Tool Tip</title>
.sage:hover .sagetooltip {
    display: block;
.sagetooltip {
    display: none;  
    background: #C8C8C8;
    margin-left: 28px;
    padding: 10px;
    position: absolute;
    z-index: 1000;

.sage {
	  color: #000000;
    font-family: Arial,Helvetica,sans-serif;
    font-size: 11px;
    font-weight: normal;

<div class="sage"><a href="">Date in hindi format</a>
    <span class="sagetooltip">Some time we need, date in Hindi format, We can show date in Hindi format with Javascript, just use bellow code for it.
Here i create two array, first for day name and second for month name in Hindi format.

function getYear(), returns current year like 2014,2013….
function getDay(), returns current day like Monday, Tuesday…..
function getMonth(), returns current month like March, April…..
function getDate(), returns current date like 11,12….</span> 

<div class="sage"><a href="">create folder in php</a>
    <span class="sagetooltip"> When have to upload file in php after create a folder/directory,
First check if folder/directory is created or not?</span> 

About Abhishek Sinha

I am Abhishek and I love to code on PHP.

Leave a Reply

Your email address will not be published. Required fields are marked *


Scroll To Top
32 Flares Twitter 2 Facebook 8 Google+ 18 StumbleUpon 1 Pin It Share 0 LinkedIn 3 32 Flares ×