Results 1 to 2 of 2

Thread: Positioning a CSS drop-down menu

  1. #1
    Join Date
    May 2006
    Posts
    275

    Positioning a CSS drop-down menu

    I'm creating a CSS-layout site that uses a drop-down menu. I've graciously borrowed and adapted (and credited) a drop-down menu style from Stu Nicholls CSS Play. This is the exact menu I'm working with:

    http://www.cssplay.co.uk/menus/basic_dd.html

    Initially, this menu worked flawlessly in all browser tests (short of Mac IE - sigh). I then nested the entire menu within an absolutely positioned div, as I want it to sit on a particular spot on my page. Again, this tested fine on all my Mac browsers (except Mac IE - sigh) but suddenly in Safari I am unable to click on the drop-down menu items. They appear when I hover over a main list item, but then try to click on them - they disappear. The menu's containing div has a defined width, but not height.

    Without having to paste all the code here or link to a sample page, can anyone suggest why this is happening? If not, I'll link up a live page tomorrow so you can see for yourself and let me know what I'm missing.

    Many thanks.

    EDIT: I'm playing around with it now, and I see that if I hover on the main link and then move my cursor down with lightning speed, I can indeed click on a sub-level link. However, no user is going to do this. Is this a known bug for Safari (v1.3.2 on OS 10.3.9)?
    Last edited by gnubler; 18 Aug 2006 at 11:47 PM.

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    When you put the drop down menus in a position: absolute div you will have separated the whole lot from the normal flow. I notice that the drop downs on the page you linked are quite deep, they must extend down below your position: absolute div, which may be why they are being cut off.

    Is it possible to put some other content in the position: absolute div underneath? The drop downs will then extend over content which is also in the same div.

    Or take the easy way out and get rid of the position: absolute containing div. Put everything in postion: relative divs. It should be possible to hold a div in a required position even then.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Similar Threads

  1. Drop down menu, CSS or otherwise
    By apuffer in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 07 Aug 2006, 02:05 PM

Posting Permissions

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