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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts

    reduce the height of a selection box

    Code:
    <select name='select' style='height:5px;width:50px'>  
    
    <option value='1'>yes</option>
    <option value='2'>no</option>
    </select> 
    
    <input type='submit' value='' style='height:18px;width:30px'>
    I like to make the height smaller, But "height:5px" seems not to work.
    Get my greedy up

  • #2
    Senior Coder
    Join Date
    Feb 2006
    Location
    USA
    Posts
    1,013
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Browsers only support a limited number of CSS properties on <select> and <option> elements.

    I suggest you use radio buttons instead.
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions
    Java != JavaScript && JScript != JavaScript
    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

  • #3
    Regular Coder oldcrazylegs's Avatar
    Join Date
    Feb 2004
    Location
    East Moline Illinois USA
    Posts
    414
    Thanks
    4
    Thanked 5 Times in 4 Posts
    try changing the font-size or line-height

    or create your own fake dropdown menu like below. you can see that on this page.
    http://dwight.clickthesky.com/frames...rames/iframes/

    Code:
    <style type="text/css">
    #dropdown {width:240px; height:84px; border:2px inset #ccc; overflow:auto;}
    #dropdown a {text-align:left; font:9pt/10pt arial,verdana,sans-serif; padding-left:2px; margin:0; white-space:nowrap;}
    #dropdown a.menu:link {text-decoration:none; display:block; background-color:#fff; color:#000;}
    #dropdown a.menu:visited {text-decoration:none; display:block; background-color:#fff; color:#000;}
    #dropdown a.menu:hover {text-decoration:none; display:block; background-color:#000; color:#fff;}
    #dropdown a.menu:active {text-decoration:none; display:block; background-color:#000; color:#fff;}
    </style>
    
    <div id="dropdown">
    <a class="menu" href="index.htm" target="_top">How To Download Files</a>
    <a class="menu" href="bestdropdownmenu.htm" target="_top">Best Dropdown Menu</a>
    <a class="menu" href="embeddingmediainhtml.htm" target="_top">Embedding Media In HTML</a>
    <a class="menu" href="miscellaneousinternettips.htm" target="_top">Miscellaneous Internet Tips</a>
    <a class="menu" href="pubcomp.htm" target="_top">Using Public Computers</a>
    <a class="menu" href="uncorruptinghtmlfiles.htm" target="_top">Uncorrupting HTML Files</a>
    <a class="menu" href="validatorcheats.htm" target="_top">HTMLValidator Cheats</a>
    <a class="menu" href="yahoogeocitiestips.htm" target="_top">Yahoo! Geocities Tips</a>
    <a class="menu" href="worldgeocities.htm" target="_top">World Geocities</a>
    </div>
    Last edited by oldcrazylegs; 04-29-2006 at 08:59 PM.


  •  

    Posting Permissions

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