Click to See Complete Forum and Search --> : Size of a drop-down menu
nestor_cantu
10-23-2007, 12:07 PM
Im working right now at a website with a form that a user needs to fill in. Text fields have a size of 24 characters, so how can i make a drop down menu that appears above the text fields appear the same size so it looks aligned?
gil davis
10-23-2007, 02:00 PM
You can either use CSS to size both, or use some script to set the width of the select equal to the width of the text box.
<select ... style="width: 100px">
...
<input type="text" ... style="width: 100px">
I don't know if 24 characters will fit into 100px, but you can figure it out.
TJ111
10-23-2007, 02:03 PM
select {
width:25em;
}
em = character-size, its good to use that instead of pix for accessibility reasons (ie, poeple who have to use enlarged text).
nestor_cantu
10-23-2007, 10:57 PM
thanks a lot!