Decrease width of select list (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


mar0364 -> Decrease width of select list (5/9/2008 11:59:46)

I've been doing some research and can't come up with a hack around this. As a simplified example I have this code:
<select>
  <option value ="volvo">Volvo is a nice care for your mother</option>
  <option value ="saab">Saab</option>
  <option value ="opel">Opel</option>
  <option value ="audi">Audi</option>
</select>


The drop down selector on the form is going to be as long as the longest option value. Is there anyway I can decrease its width? I'm willing to lose a few characters off the right side of the name.




mar0364 -> RE: Decrease width of select list (5/9/2008 12:25:41)

Rich try this CSS
.abc{ width:in_px; font-size:in_px;}
Hope it helps.




mar0364 -> RE: Decrease width of select list (5/9/2008 12:26:06)

Worked great!! Man your good.




rdouglass -> RE: Decrease width of select list (5/9/2008 13:04:49)

Psychiatrists have names for conditions like this....[:D]




Tailslide -> RE: Decrease width of select list (5/9/2008 13:14:15)

Dear god he's finally lost it! [:o]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.03125