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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Tool Tip phpsage.com</title>
<style>
.sage:hover .sagetooltip {
    display: block;
}
.sagetooltip {
    display: none;  
    background: #C8C8C8;
    margin-left: 28px;
    padding: 10px;
    position: absolute;
    z-index: 1000;
    width:150px;
}

.sage {
    margin:100px;
	  color: #000000;
    font-family: Arial,Helvetica,sans-serif;
    font-size: 11px;
    font-weight: normal;
}
</style>
</head>

<body>
<div class="sage"><a href="http://phpsage.com/date-in-hindi-format/">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>

<div class="sage"><a href="http://phpsage.com/create-folder-php/">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> 
</div>
</body>
</html>

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 ×