hover

Discussion in 'HTML' started by earl, Nov 12, 2003.

  1. earl

    earl Guest

    <a href="...">Link</a>
    <br>
    <div id="submeny">
    Some text....
    </div>

    a:hover
    {
    color : #000;
    background : #ccc;
    }

    #submeny
    {
    display : none;
    }

    How can I show the submeny when the link is hover-over and then hide it
    again when the mouse is not hovering over the link if you know what I mean ?
    The submeny should only be shown when mouse cursor is over the link.
    earl, Nov 12, 2003
    #1
    1. Advertising

  2. earl

    Sid Ismail Guest

    On Wed, 12 Nov 2003 23:40:25 +0100, "earl" <> wrote:

    : <a href="...">Link</a>
    : <br>
    : <div id="submeny">
    : Some text....
    : </div>
    :
    : a:hover
    : {
    : color : #000;
    : background : #ccc;
    : }
    :
    : #submeny
    : {
    : display : none;
    : }
    :
    : How can I show the submeny when the link is hover-over and then hide it
    : again when the mouse is not hovering over the link if you know what I mean ?
    : The submeny should only be shown when mouse cursor is over the link.
    :


    This is a job for Javascript, not a:hover
    http://javascript.internet.com/

    Sid
    Sid Ismail, Nov 12, 2003
    #2
    1. Advertising

  3. earl

    earl Guest

    "Sid Ismail" <> wrote in message
    news:...
    > On Wed, 12 Nov 2003 23:40:25 +0100, "earl" <> wrote:
    >
    > : <a href="...">Link</a>
    > : <br>
    > : <div id="submeny">
    > : Some text....
    > : </div>
    > :
    > : a:hover
    > : {
    > : color : #000;
    > : background : #ccc;
    > : }
    > :
    > : #submeny
    > : {
    > : display : none;
    > : }
    > :
    > : How can I show the submeny when the link is hover-over and then hide it
    > : again when the mouse is not hovering over the link if you know what I

    mean ?
    > : The submeny should only be shown when mouse cursor is over the link.
    > :
    >
    >
    > This is a job for Javascript, not a:hover
    > http://javascript.internet.com/
    >
    > Sid
    >


    Thanks for your reply.

    Think I've seen this done before using css but cant find it, I could
    obviously be wrong.
    earl, Nov 12, 2003
    #3
  4. Hi earl,

    [Thu, 13 Nov 2003 00:39:27 +0100/earl]
    > > : How can I show the submeny when the link is hover-over and then hide it
    > > : again when the mouse is not hovering over the link if you know what I

    > mean ?
    > > : The submeny should only be shown when mouse cursor is over the link.
    > > :
    > >
    > >
    > > This is a job for Javascript, not a:hover
    > > http://javascript.internet.com/
    > >
    > > Sid
    > >

    >
    > Thanks for your reply.
    >
    > Think I've seen this done before using css but cant find it, I could
    > obviously be wrong.


    Nope, it is possible, but doesn't work in all browser. Would not
    yet use this these days. (afaicr opera6/IE6 had some positional
    probs with it)

    The thing is to use a positioned <span> inside the a-tag, hide it
    per default and display:block it during hovering.

    HTH
    regs
    michael
    Michael Weber, Nov 13, 2003
    #4
  5. earl

    SteW Guest

    earl wrote:

    > How can I show the submeny when the link is hover-over and then hide it
    > again when the mouse is not hovering over the link if you know what I mean ?
    > The submeny should only be shown when mouse cursor is over the link.


    Here's a start - works for gecko based browsers, but not for ie, nor for
    opera 6 - don't know about later operas.

    http://www.meyerweb.com/eric/css/edge/menus/demo.html

    Ste W
    SteW, Nov 13, 2003
    #5
  6. earl

    Mark Parnell Guest

    Mark Parnell, Nov 13, 2003
    #6
  7. earl

    Eric Bohlman Guest

    SteW <> wrote in
    news:boulvt$12t$:

    > Here's a start - works for gecko based browsers, but not for ie, nor
    > for opera 6 - don't know about later operas.
    >
    > http://www.meyerweb.com/eric/css/edge/menus/demo.html


    It works, but not reliably, on Opera 7.21. Sometimes the popup won't
    appear, but leaving the link and coming back to it will make it appear. It
    almost looks like a z-order problem of some sort (the link itself will
    always expand, but sometimes the popup appears to be hidden underneath the
    main text).
    Eric Bohlman, Nov 13, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. msnews.microsoft.com
    Replies:
    0
    Views:
    2,316
    msnews.microsoft.com
    Jun 26, 2003
  2. Paul

    Toolbar appears on image hover

    Paul, Jul 16, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    372
  3. Brad

    Hover button

    Brad, Jan 25, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    2,377
    Scott M.
    Jan 25, 2004
  4. alanb
    Replies:
    2
    Views:
    523
    alanb
    Apr 23, 2004
  5. VB Programmer

    Change cell color when hover

    VB Programmer, Jun 11, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    3,812
    VB Programmer
    Jun 11, 2004
Loading...

Share This Page