hover

E

earl

<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.
 
S

Sid Ismail

: <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
 
E

earl

Sid Ismail said:
: <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.
 
M

Michael Weber

Hi earl,

[Thu, 13 Nov 2003 00:39:27 +0100/earl]
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
 
E

Eric Bohlman

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).
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top