Results 1 to 3 of 3

Thread: re: anylink CSS menu positioning

  1. #1
    Join Date
    Jan 2005
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default re: anylink CSS menu positioning

    anylink css menu

    Really nice and even more manageable than the anylink dropdown, but is there a way to position the menu so it's not so tight up against the link?

    Currently, the menu drops right below it... but can it be altered so it's a few pixels lower? I've tried positioning the dropdown in the .anylinkcss style but it doesn't work.

    Just curious... thanks.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This line controls the vertical position of the drop down:
    Code:
    dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
    to get it a little further down, just add to it like:
    Code:
    dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+5+"px"
    This will affect the positioning in those situations where the drop down must drop up so, you should compensate by also changing:
    Code:
    edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
    by an equal yet, opposite value to (in this case):
    Code:
    edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight-5
    Just to clarify, this second change deals with the vertical position of the drop down when the menu is so close to the bottom edge of the browser that it needs to 'drop up' in order to be visible.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2005
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    help much appreciated. thank you! it works like a charm.

Bookmarks

Posting Permissions

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