Results 1 to 2 of 2

Thread: How to do a hover popup over table rows

  1. #1
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to do a hover popup over table rows

    I have the following page:

    http://take2records.com/test/dbtest....&id_num=404100

    I'm using php and mysql to generate the rows of a table. I need to have a popup occur when the user hovers over each row.

    Here's the code which builds the table:

    PHP Code:
    while($info mysql_fetch_array$data ))
     {
     
    $count++; 
     Print 
    "<tr>"
     Print 
    "<th>Track:</th> <td>".$count."</td> ";
     Print 
    "<td>".$info['title'] . "</td> "
     Print 
    "<th>Date:</th> <td>".$info['rec_date'] . "</td> "
     Print 
    "<th>Composer:</th> <td>".$info['authors'] . "</td> ";
     Print 
    "<th>Artist:</th> <td>".$info['artists'] . "</td> ";
     Print 
    "<th>Time:</th> <td>".$info['time'] . "</td> "
     Print 
    "<th>Blurb:</th> <td>".$info['blurb'] . " </td></tr>"
     } 
     Print 
    "</table>"
    And in my CSS I have been able to change the row color while hovering:

    Code:
    tr:hover { background: #FCF; }
    But I don't see how to do the popup.

  2. #2
    Join Date
    Sep 2010
    Location
    California
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile

    The basic way to have text pop up when a user hovers over an element is this:

    <tag title = "Your Text Here"></tag>

    It doesn't allow styling, but gets the job done.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •