Page 1 of 1

Tooltip

Posted: Thu Aug 02, 2007 4:56 am
by rash28
I have a tool tip information.

The first field is out of the image.
How do I insert into the image.
How can I set the image width and heigth in CSS

Code: Select all

.ToolText{position:absolute; }
.ToolTextHover{position:absolute;}
.ToolText span{display: none;}

.ToolTextHover span{
display: block;
  z-index: 100;
  position: absolute;
  top: 2.5em;
  left: 0;
  width: 20px;
  height: 25px;
  padding: 3px 7px 4px 6px;
  border: 2px solid #336;
  background-image:  url(bt.gif);
  background-repeat:repeat-x;
         width:20px;
        height:100%;

  font-family: arial, helvetica, sans-serif;
  font-size: 12px;
  font-weight: normal;
  color: #000;
  text-align: left;
}


Code: Select all

<?
$data = file('abc.txt');
foreach($data as $lines)
{
        $line=explode(":",$lines);

}

$tool=$line[0].$line[1].$line[2].$line[3].$line[4].$line[5];
echo "<p class=\"ToolText\" onMouseOver=\"javascript:this.className='ToolTextHover'\" onMouseOut=\"javascript:this.className='ToolText'\">--$line[0]";



echo "<span>$tool</span></p>";
?>