|
Posted by Ben C on 06/28/07 18:18
On 2007-06-28, Froefel <hansdeschryver@gmail.com> wrote:
> I'm looking for a way to restrict a listbox from resizing
> horizontally.
>
> The listbox sits within a <td> and has a style="width=100%;"
>
> This makes sure that the listbox is always as wide as its (fixed-
> width) <td>, nomatter how short the text of the items.
style="width=100%" is incorrect syntax, it should be "width: 100%". But
it doesn't matter, because the width of the <li> should be the full
available width anyway (assuming you haven't floated it or anything).
> However, when the text of an item is longer than the listbox width,
> the listbox is resized horizontally to accommodate the text. I would
> like to prevent that from happening, so that either the text gets cut
> off, or a horizontal scroll bar appears.
>
> Can this be done with CSS or any other way?
Something has to determine that width-- you talk about the text being
longer than the "listbox width" but that width is a function of many
things, including the text, and probably other features of the table.
Post a URL because it's not clear what the exact problem is.
Navigation:
[Reply to this message]
|