It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

menus

menus

Postby lil9 on Thu Apr 21, 2005 9:35 pm

Hi im making a website but ive come stuck because i dont know how to make a menu that has images and once som1 clicks it some links appear under it. my site is www.lil9.com

An example of what i mean, www.cncden.com there menu works how id like mine to.

Could any1 help me out on what i have to do?


thanks
lil9
User avatar
lil9
50+ Club
 
Posts: 56
Joined: Wed Sep 08, 2004 9:31 am
Location: UK - England - Hull

Postby Phate on Fri Apr 22, 2005 1:01 am

well, i would check out the "menu" section of http://dynamicdrive.com
Web-Developing since '03
Image
User avatar
Phate
500+ Club
 
Posts: 826
Joined: Sun Nov 21, 2004 4:12 am
Location: 127.0.0.1

Postby Malcolm on Fri Apr 22, 2005 7:38 pm

Here's one, quick n' easy:
Code: Select all
<style type="text/css">
   #menu1 { border: 1px solid #000; width: 120px; }
   #items1 { overflow:hidden; height:0px; }
</style>

<div id="menu1" onmouseover="document.getElementById('items1').style.height='auto';" onmouseout="document.getElementById('items1').style.height='0px';">
   Menu Header
   <div id="items1">
      <a href="#">a blah</a><br />
      <a href="#">b blah</a><br />
      <a href="#">c blah</a><br />
   </div>
</div>

Works in Mozilla, IE and Opera :)

{Edit}
After playing around with the code for a bit Opera seems to like this:
Code: Select all
<style type="text/css">
   .menu { border: 1px solid #000; width: 120px; }
   .items { overflow:hidden; height:0px; }
   .menu:hover .items { height: auto; }
   
</style>

<div class="menu">
   Menu Header
   <div class="items">
      <a href="#">a blah</a><br />
      <a href="#">b blah</a><br />
      <a href="#">c blah</a><br />
   </div>
</div>

But non of the other browsers do :P
Image
User avatar
Malcolm
100+ Club
 
Posts: 198
Joined: Thu Oct 07, 2004 9:53 pm
Location: Ontario, Canada

Postby lil9 on Sat Apr 23, 2005 7:21 pm

malcom is there any way to make ur code work so that the links dont apear until som1 clicks on the image? also without a border ?
User avatar
lil9
50+ Club
 
Posts: 56
Joined: Wed Sep 08, 2004 9:31 am
Location: UK - England - Hull

Postby Malcolm on Sat Apr 23, 2005 11:29 pm

Not this way, you'd need to figure out something else.
Image
User avatar
Malcolm
100+ Club
 
Posts: 198
Joined: Thu Oct 07, 2004 9:53 pm
Location: Ontario, Canada

Postby dafunkymunky on Sat Apr 30, 2005 11:55 am

hi lil

if you could give apictorial representation of what exactly type of window you need i could code one for you
well but you will have to wait till 6 th till i login again
i will be busy next week with my exams

--DAFUNKYMUNKY
User avatar
dafunkymunky
100+ Club
 
Posts: 183
Joined: Fri Apr 08, 2005 7:32 am
Location: India


Who is online

Users browsing this forum: No registered users and 6 guests