Jump to content

show a hidden box when hovering a link


smerny

Recommended Posts

How can I make it so I have text that says "Hoover to View Comment" and when someone puts mouse on that text, it displays a simple box with the comment inside of it? sort of like CSS drop down menus except this is a href within a table cell, and i want to drop down a box with a paragraph in it rather than a list of links.

 

I started to attempt this and I got stuck right away, I think the HTML would be like:

 

"<a href='#' class='popup'>Hoover to View Comment</a>"

 

and say the comment is in a php variable named $pr['comment']... i started thinking about the CSS behind this but i don't know how i would make the comment show up.

 

thanks for any help

Link to comment
Share on other sites

How can I make it so I have text that says "Hoover to View Comment" and when someone puts mouse on that text, it displays a simple box with the comment inside of it? sort of like CSS drop down menus except this is a href within a table cell, and i want to drop down a box with a paragraph in it rather than a list of links.

 

I started to attempt this and I got stuck right away, I think the HTML would be like:

 

"<a href='#' class='popup'>Hoover to View Comment</a>"

 

and say the comment is in a php variable named $pr['comment']... i started thinking about the CSS behind this but i don't know how i would make the comment show up.

 

thanks for any help

 

Would the display property work? (I think I know what you mean  :-\)

Link to comment
Share on other sites

Play with this.

<a href="#">Hover to view text<span>This is the hover text. It is hovering.</span></a>

 

a span
{
  position:absolute;
  left:0;
  top:0;
  display:none;
}

a:hover span
{
  display:block;
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.