d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Dropdown Width Problem > Html/css
Add Reply New Topic New Poll
Member
Posts: 8,635
Joined: Dec 28 2007
Gold: 87.00
Sep 3 2012 06:36am
So I would like to keep dropdown select area same width as the select field itself.

Example in picture:


Here is my code:
Code

<select style="max-width:80" name="select">
<option label="Select 1" value="1">Select 1</option>
<option label="Select 2" value="2">Select 2</option>
<option label="Select 3" value="3">Select 3 is longer than others</option>
</select>


Does any one know how could I fix this to work as I want?
Member
Posts: 13,630
Joined: Dec 4 2009
Gold: 0.00
Sep 3 2012 02:06pm
Try setting the width, the changing overflow to hidden.
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll