PDA

View Full Version : Select box cutting last letter off



masterofollies
Jan 19th, 2009, 10:36 PM
I attached 2 small screenshots of my select box. It shows Select Use and then when you click it, it shows the correct Select User. How can I expand the box so it shows it correctly?

Excavator
Jan 19th, 2009, 10:42 PM
Hello masterofollies,
I'm no expert on forms but when your text is going behind that dropdown arrow like that, I think that means it needs some extra width on the box.
Either from padding or actually setting a width.
I think I would try adding some padding.

Common
Jan 19th, 2009, 10:43 PM
<select> boxes can have a CSS width value.

ie:


<style type="text/css">
<!--

.widebox{
width:200px;
}

-->
</style>

<select class="widebox">
<option value="1">Hello</option>
<option value="2">World</option>
</select>

And, as Excavator says, padding would work too, although I'm not sure how happy IE would be about that... had some bad experiences with the padding attribute in IE before...

masterofollies
Jan 19th, 2009, 10:51 PM
Ah alright thanks, I suppose CSS would work in this case. I tried size="20" but that made the height of the box changed, so I was like DOH!