|
-
Jun 29th, 2003, 07:06 PM
#1
Thread Starter
Stuck in the 80s
[Resolved] HTML: INPUT field resizes to size of text?
My problem lies in code like this:
Code:
<table border="1" style="width: 45%;">
<tr>
<td style="width: 30%;">Your Name :</td>
<td style="width: 70%;">
<input type="text" name="textbox" value="[long text here]" style="width: 100%;">
</td>
</tr>
</table>
Rather than fitting to the 70%, the input field will make itself the entire width of the text. How can I make it just size to the 70%?
Last edited by The Hobo; Jul 1st, 2003 at 01:30 PM.
-
Jun 29th, 2003, 10:42 PM
#2
Thread Starter
Stuck in the 80s
-
Jun 30th, 2003, 12:34 AM
#3
Re: HTML: INPUT field resizes to size of text?
Originally posted by The Hobo
Rather than fitting to the 70%, the input field will make itself the entire width of the text. How can I make it just size to the 70%?
I checked your code, but that's not what I'm getting. The input field is the entire width of the td here.
Could it be a browser problem?
Windows XP/IE6 here.
-
Jun 30th, 2003, 09:26 PM
#4
Thread Starter
Stuck in the 80s
I've tried it in both IE5.5 and IE6 and I get the same results.
-
Jul 1st, 2003, 12:20 AM
#5
Post a snapshot, or if possible link to the page.
-
Jul 1st, 2003, 12:07 PM
#6
Thread Starter
Stuck in the 80s
Did you replace "[long text here]" with some really, really long text?
The problem only occurs when the amount of text exceeds that which can be displayed by the size of the box. When that happens, the box, for some reason, expands to display ALL of the text.
-
Jul 1st, 2003, 01:29 PM
#7
Thread Starter
Stuck in the 80s
Code:
<table border="1" style="table-layout: fixed; width: 45%;">
<tr>
<td style="width: 30%;">Your Name :</td>
<td style="width: 70%;">
<input type="text" name="textbox" value="[long text here]" style="width: 100%;">
</td>
</tr>
</table>
Adding table-layout: fixed; corrected the problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|