Forum Moderators: not2easy

Message Too Old, No Replies

Drop down menu

         

Pokerstar

11:01 am on Jul 2, 2007 (gmt 0)

10+ Year Member



Hi, I need some help with my drop down menu's.

I am using an image map for my links, however i want a drop down menu from some of those links.
The drop down works fine however it appears in the wrong place (e.g 6 inches to the left of the actual link)

Can someone tell me how to position these drop down menus so that they appear under the link they are attached to.

Here is the work that i have done on it so far, obviously only the important stuff.

<style>
body{font-family:arial; }

a{color:black;text-decoration:none;font:bold}
a:hover{color:teal}
td.menu{background:blue}
table.menu
{
font-size:100%;
position:absolute;
visibility:hidden;
}
</style>
<script type="text/javascript">
function showmenu(elmnt)
{
document.getElementById(elmnt).style.visibility="visible"
}
function hidemenu(elmnt)
{
document.getElementById(elmnt).style.visibility="hidden"
}
</script>

<area shape="rect" coords="435,130,525,155" onmouseover="showmenu('where')"onmouseout="hidemenu('where')"
a href="photo.html" alt="photos">

<table class="menu" id="where" >
<tr><td class="menu"><a href="ukphoto.html">In the UK</a></td></tr>
<tr><td class="menu"><a href="abroadphoto.html">Abroad</a></td></tr>

</table>

As i have explained the drop down works fine but it appears in the wrong place.

Thanks in advance for any help :)

Pokerstar

9:16 pm on Jul 3, 2007 (gmt 0)

10+ Year Member



Can no-one help me?

As i have explained it is just a matter of positioning. The drop down menu appears on the left hand side of the page and not under the link.

Please help :)

coyoteRick

9:34 pm on Jul 3, 2007 (gmt 0)

10+ Year Member



Unfortunately, CSS cannot modify image maps, at least to my knowledge.

I think your solution for your drop down menu positioning may lie within your javascript development.

A CSS Solution for "Image maps" is entirely different than defining dimensions of a "hot spot" with the <area> element and takes no Javascript at all.

I'd encourage you to post this in a more pertinent forum. I'm next to clueless when it comes to javascript development.

Pokerstar

9:40 pm on Jul 3, 2007 (gmt 0)

10+ Year Member



Thanks for the reply.

Do you have any suggestion about where I could find this information?

coyoteRick

9:49 pm on Jul 3, 2007 (gmt 0)

10+ Year Member



Sure, try the Javascript & AJAX forum here at Webmasterworld.

[webmasterworld.com...]

Pokerstar

9:53 pm on Jul 3, 2007 (gmt 0)

10+ Year Member



Thanks very much :)