Scripsit
laredotornado@zipmail.com:
Quote:
Say I have this textbox
In your Subject you called it textbook. Please type more carefully in
future.
Quote:
<input "readonly" type="text" class="productName" value="<!-- could be
anything here -->" id="Name1" name="Name1">
>
How (if at all) can I define the class "productName" to make the width
of the textbox long enough to display all of the value of the textbox,
but then not take up any unnecessary space?
Hardly. Form fields are typically implemented by system routines that have
idiosyncratic features that might be immune to any CSS code.
But why would you use such an element in the first place? If it's static
data to be included into the form set and to be shown to the user, express
this separately, e.g.
<span class="productName">foo bar</span>
<input type="hidden" name="Name1" value="foo bar">
You can then style the <spanas desired (or leave it unstyled - by default,
it occupies its natural width automatically).
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/