View Full Version : reduce the height of a selection box

04-28-2006, 04:54 AM
<select name='select' style='height:5px;width:50px'>

<option value='1'>yes</option>
<option value='2'>no</option>

<input type='submit' value='' style='height:18px;width:30px'>I like to make the height smaller, But "height:5px" seems not to work.

04-28-2006, 05:06 AM
Browsers only support a limited number of CSS properties on <select> and <option> elements.

I suggest you use radio buttons instead.

04-29-2006, 08:55 PM
try changing the font-size or line-height

or create your own fake dropdown menu like below. you can see that on this page.

<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;}

<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>

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum