Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Oct 2002
    Location
    || Canada ||
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hardcoding dropdown menu WIDTH

    I've tired searching for the answer first but anyhow...

    I would like to know if it's possible to hardcode a specific width of a drop down menu?

    One of the options/titles in the drop-down menu is very-y long so the drop-down extends the entire length of the box..

    We don't want it wider then 450px MAX

    So... can this be done? and/or can you 'wrap' a title?

    Help

  • #2
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmmm, I am not sure if it will work (no time to check) but have you tried the CSS property max-width?

    ::] krycek [::
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    im not sure that max-width is supported yet though
    redhead

  • #4
    New Coder
    Join Date
    Oct 2002
    Location
    || Canada ||
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm going to try searching for this (though nothing as of yet), but is there an attribute I can use within the form/option tag itself?

    I know using CSS is good but this is the only place where this problems occurs is with this one drop-down menu (which BTW, you select from a list of options and then 'go').


    We've tried width="" and max-width="" and maxwidth=""

    Thanks for any help in the meantime

  • #5
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    well, max-width is CSS only so nope it will not work as an attribute (unless inside a style attribute).

    I am not sure that overflow would apply to a select/option element, but you could try overflow: hidden (the attribute would be style="overflow: hidden")

    Other than that I am not sure

    ::] krycek [::
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."

  • #6
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    speaking of CSS why not use that?
    Code:
    <select style="width:300px;">
    <option>blah</option>
    </select>
    that would not wrap though...

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #7
    New Coder
    Join Date
    Oct 2002
    Location
    || Canada ||
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, I've passed these points onto the person responsible/taking care of the drop-down...

    Will let all know what or if it works

    Thanks


  •  

    Posting Permissions

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