#1
  1. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Oct 2008
    Posts
    90
    Rep Power
    14

    Question Set the height of a drop down


    Hi,

    Is there a way of setting the height of a drop down box?
    I could manage this by setting the font-size but have to set it really big to get the height of the drop down to increase!

    Please Assist!
  2. #2
  3. Contributing User
    ASP High Scholar (3500 - 3999 posts)

    Join Date
    Jul 2005
    Location
    Oxford UK
    Posts
    3,897
    Rep Power
    993
    hi i think u are looking this
    Code:
    <select name="menu" size="3" style="height: 125px; width: 150px;"> 
    <option value="1">maple</option> 
    <option value="2">hickory</option> 
    <option value="3">birch</option> 
    </select>
    Last edited by Guddu; October 30th, 2008 at 06:43 AM.
    Nothing is Impossible bcoz IMPOSSIBLE itself says..
    I M POSSIBLE........................
    Be cool !!!!!!!!
  4. #3
  5. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Oct 2008
    Posts
    90
    Rep Power
    14

    Question Unsuccessful


    H, thanks for the assist!

    But unfortunately not winning! I set the size=3 but what this does - shows the first 3 rows in input box of drop down
    the style height does not work - width does.

    I want the drop down textbox height to increase where the drop down icon lies (first row) and not the drop down list.

    Please Assist!
  6. #4
  7. Contributing User
    ASP High Scholar (3500 - 3999 posts)

    Join Date
    Jul 2005
    Location
    Oxford UK
    Posts
    3,897
    Rep Power
    993
    i m not sure what are u looking for .try this
    Code:
    <SELECT  style="font-size:50px"  NAME="available" id="available" STYLE="width:20%;">
    <option>dd</option>
    </SELECT>
  8. #5
  9. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Oct 2008
    Posts
    90
    Rep Power
    14

    Question Thanks ?


    Hi, thank you

    I did set the font-size to increase the height
    The problem is that i have to set the fon't really big to get the dropbox height to 23px.

    Is there perhaps another way?

    Please Assist!

    Regards
  10. #6
  11. Contributing User
    ASP High Scholar (3500 - 3999 posts)

    Join Date
    Jul 2005
    Location
    Oxford UK
    Posts
    3,897
    Rep Power
    993
    i fear i can't help u now.i don't understand why u are after select box height.?may be another better way by other members of this forum.

    cheers!!
  12. #7
  13. Expert Learner
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Feb 2005
    Location
    Wisconsin
    Posts
    1,909
    Rep Power
    102
    To clarify, modify the height with style="height: 150px;".
    The size attribute determines how many options are in view without scrolling.

    You may also style the <option>'s inside the <select>. Try messing with the height, padding, and font-size properties to get what you're looking for.
  14. #8
  15. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,135
    Rep Power
    2926
    hi Ismailc,

    what you ask for is not possible.
    the HTML drop down control does not support setting its height.

    you can however use such code:
    Code:
    <select style="font-size: 3em;">
    using "em" instead of "px" will make the font very large when using small numbers.
    the above code will make the drop down 3 times bigger than usual for example.

    to have drop down with independent height (i.e. height not dependent on font size)
    you'll have to build your own control using HTML, CSS and JavaScript.

Similar Threads

  1. Get remote image width and height using pure ASP
    By Shadow Wizard in forum Code Bank
    Replies: 4
    Last Post: April 21st, 2009, 01:22 AM
  2. Height problems with my divs
    By squirrelj in forum HTML, JavaScript And CSS Help
    Replies: 2
    Last Post: February 15th, 2006, 03:04 PM
  3. select item from drop down populated from database
    By maxtrixx in forum ASP Development
    Replies: 0
    Last Post: August 23rd, 2004, 11:17 AM
  4. need help regarding drop down box
    By rajmehta in forum ASP Development
    Replies: 1
    Last Post: April 4th, 2004, 01:17 AM
  5. Disabled Drop Down List's Selected Value Can't Be Read
    By heilmank in forum .NET Development
    Replies: 4
    Last Post: January 7th, 2004, 09:25 PM

IMN logo majestic logo threadwatch logo seochat tools logo