Form, making Text field as wide as your <TD> ?

M

McKirahan

Mel said:
is it possible ?

i tried size=100% and 'NADA !'

thanks,
Mel

Is this what you want? Watch for word-wrap.

<html>
<head>
<title>width.htm</title>
</head>
<body>
<form>
<table border="0" cellpadding="0" cellspacing="0" width="300">
<tr>
<td align="center">
<input type="text" style="width:300">
</td>
</tr>
</table>
</form>
</body>
</html>


Not that "width=" value equals the "width:" value.

What's 'NADA !'?
 
M

Mel

Thanks for your help, but what happens when the table width is 100% instead
of "300" ?
i need my text to resize based on the table size !!!

can you please help ?

oh Nada is Nothing in spanish
 
M

McKirahan

Mel said:
Thanks for your help, but what happens when the table width is 100% instead
of "300" ?
i need my text to resize based on the table size !!!

can you please help ?

Try:

<input type="text" name="what" style="width:100%">
 
M

Mel

that's exactly what i tried and what i get a a "text" that's 100px wide and
not 100% of <TD>

Yours, mel
 
L

Lasse Reichstein Nielsen

Please don't top post!
that's exactly what i tried and what i get a a "text" that's 100px wide and
not 100% of <TD>

IIRC, you tried <input ... size="100%">. That is something different
(and incorrect, the value of the size attribute should be a number,
not a percentage).

And it works for me. Example code:
<table style="width:100%">
<tr><td><input type="text" style="width:100%"></td></tr>
</table>
So, what are you doing differently.

/L
 
T

Thomas 'PointedEars' Lahn

Mel said:
that's exactly what i tried and what i get a a "text" that's 100px wide and
not 100% of <TD>

Are you sure? If yes, your user agent is
borken. Re-install, update or replace it.
[Top post]

Please do not do that.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top