Results 1 to 9 of 9

Thread: Select menus opening vertically

  1. #1
    Join Date
    Sep 2008
    Posts
    119
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Angry Select menus opening vertically

    Hi everyone,

    So when I have a select menu with many options, depending on the position of the page, the menu opens upwards instead of downwards. Does anyone know if there is a css hack for this, or if it's possible to change?

    - Ben
    document.write is document.wrong

  2. #2
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    1,720
    Thanks
    82
    Thanked 90 Times in 88 Posts

    Default

    Could you post a link to the script you are referring to?
    To choose the lesser of two evils is still to choose evil. My personal site

  3. #3
    Join Date
    Sep 2008
    Posts
    119
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply james,

    Here's the basic of it -

    http://jsfiddle.net/falkon303/m9xfP/

    if you click the select menu, it goes upwards based on the position of the page. Hoping there is a css hack to fix it not to.
    document.write is document.wrong

  4. #4
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    689
    Thanks
    1
    Thanked 113 Times in 111 Posts

    Default

    Hi there Falkon303,

    the select "select elemnent" will extend downwards until the browser decides otherwise.

    coothead

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,997
    Thanks
    43
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    That's right coothead, and in Chrome, Opera, and Firefox the example given will extend down out over the bottom edge of the window if there's enough screen below it to do so. I just checked, in IE 10 it will do the same, only with a twist - if there isn't enough room it will use the room that there is with however many items won't fit appearing above the position of the select element.

    The bottom line though is that no browser will extend all of the items down unless there's room for them on the screen. Nor should they. If they did, items would be off the screen and unseen.

    It's not the select's position in the window, it's its position on the user's screen.

    If there were an attribute or css that would force it to go down in all circumstances, that would sometimes result in some items not being seen, so it would be best to avoid that anyway.
    - John
    ________________________

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

  6. #6
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    689
    Thanks
    1
    Thanked 113 Times in 111 Posts

    Default

    Hi there John,

    I probably did the same tests as you.

    I even started my post with the intention of detailing all of my
    findings but in the end just decided to write "The bottom line"


    coothead

  7. #7
    Join Date
    Sep 2008
    Posts
    119
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply guys,

    Dang. Problem is I have a select menu that has enough space to display the list downwards, but it goes up anyways. Just kind of annoying is all. Perhaps if I can somehow trick the browser through javascript into thinking the position of the select menu is higher on the page. It's not a big deal, but I am sure you all know how it's difficult to leave something not exactly the way you want it.

    Thanks,

    - Ben
    document.write is document.wrong

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,997
    Thanks
    43
    Thanked 3,198 Times in 3,160 Posts
    Blog Entries
    12

    Default

    Hmm, it can't be very close to having enough room I would think.

    One thing you could try is putting white space after it on the page, like a bunch of:

    HTML Code:
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    just to see what would happen. In fact, if you have enough of those, there should always be room on the page (not the window) for it to drop down. If you also were to scroll the page onmouseover of the select if there weren't enough room, that might take care of it. But the page would lurch sometimes.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

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

  9. #9
    Join Date
    Sep 2008
    Posts
    119
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default

    Thanks jscheuer1,

    It was overflowing just a tiny bit so I changed the font size. Got it how I want it. More curious if it's possible than anything else.

    Best,
    - Ben
    document.write is document.wrong

Similar Threads

  1. two select menus on same page
    By chechu in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 03-30-2009, 03:13 PM
  2. Replies: 1
    Last Post: 07-11-2007, 02:44 PM
  3. select menus show through lightbox in ie
    By nevdev in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 03-01-2007, 05:16 PM
  4. Chained Selects - return database info to select menus
    By button1 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 10-31-2006, 02:47 PM
  5. Question regarding dhtml menus opening over form fields...
    By 6foot4 in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 10-19-2004, 02:15 PM

Tags for this Thread

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
  •