Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Hover/Click Info Box

    I want to get a hold of a code that when you hover over text, a box comes up (like in help files-- when you click on a link sometimes, a yellow box comes up with black text in it) giving a little info on the topic.

    Does anyone know where I could get a hold of such a code?

    Thanks.

  • #2
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,702
    Thanks
    0
    Thanked 233 Times in 228 Posts
    Hi there NEONecd999,

    Welcome to these forums.
    Do you want something like this....
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta content="mshtml 6.00.2800.1264" name="generator" />
    <title>little yellow box</title>
    <style type="text/css">
    /*<![CDATA[*/
    span
       {
        font-family:arial;
        font-size:16px;
        color:#ff0000;
        cursor&#58;pointer;
       }
    div
       {
        width:81px;
        height:50px;
        border:solid 1px #000000;
        position:absolute;
        left:90px;
        top:45px;
        background-color:#ffff00;
        font-family:arial;
        font-size:11px;
        color:#000000;
        padding:5px;
        visibility:hidden;
       }
    /*]]>*/
    </style>
    </head>
    <body>
    <p>Do you need &#160;
    <span onmouseover="getElementById('foo').style.visibility='visible'" 
    onmouseout="getElementById('foo').style.visibility='hidden'">
    information
    </span>
    </p>
    <div id="foo">This is the Information that you requested</div>
    </body>
    </html>
    cthead

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    use title attribute.
    if you need more functionality, or more presentation option see my tooltips code
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"


  •  

    Posting Permissions

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