Results 1 to 5 of 5

Thread: Set the height of a drop down

  1. #1
    Join Date
    Dec 2007
    Posts
    88
    Thanks
    2
    Thanked 0 Times in 0 Posts

    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!

    I posted in CSS, but would like to know if there is a script that could help

    Please Assist!

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I'm guessing you mean a select box, the code to do this for every option would be this:
    Code:
    <html>
        <head>
        <title>Select Box</title>
        <style type="text/css">
        .a option {
            height: 50px;
        }
        </style>
        </head>
        <body>
            <select class="a">
                <option>A</option>
                <option>B</option>
                <option>C</option>
            </select>
        </body>
    </html>
    Jeremy | jfein.net

  3. #3
    Join Date
    Dec 2007
    Posts
    88
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Wink This works- thank you

    Thank you - I thought this was not possible ...

  4. #4
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    Alternative:

    Code:
    <html>
        <head>
        <title>Select Box</title>
        </head>
        <body>
            <select size="3">
                <option>A</option>
                <option>B</option>
                <option>C</option>
            </select>
        </body>
    </html>
    The highlighted code may be changed to fit your wants/needs. This is the height of the box after it is dropped down. I don't know if this is what you wanted or not. You can also use margin:

    Code:
    <html>
        <head>
        <title>Select Box</title>
        </head>
        <body>
            <select style="margin:20px;">
                <option>A</option>
                <option>B</option>
                <option>C</option>
            </select>
        </body>
    </html>
    The highlighted code may be changed, again. This will do something. Test it out.

    -magicyte

  5. #5
    Join Date
    Dec 2007
    Posts
    88
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Thank You

    Thank You for the help - I'm happy with the first result.
    Increase the height of the input box of the text box.

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
  •