PDA

Click to See Complete Forum and Search --> : Size does matter for this thread ...


alex_read
Mar 6th, 2001, 07:30 AM
I have a table in which I've created the layout with percentages - i.e. in my HTML page, I've told it "the first column should take up 10% of whatever the screen size is..."

<Input type="text" name = "TxtEvent1" size=col width>

Is the wrong code I am using. I need my text boxes width to match that of the column.

Can anyone help me please :( :confused:

monte96
Mar 6th, 2001, 10:13 AM
There is no such thing as 'col width'.

What you will need to do, is set the width of the TD tag with whatever % you need, then set the style attribute on the INPUT tag:



<TABLE border=1 width=100%>
<TR>
<TD width=10%><Input type="text" name = "TxtEvent1" style="width: 100%">
</TD>
<TD width=10%><Input type="text" name = "TxtEvent2" style="width: 100%">
</TD>
<TD width=10%><Input type="text" name = "TxtEvent3" style="width: 100%">
</TD>
<TD width=10%><Input type="text" name = "TxtEvent4" style="width: 100%">
</TD>
<TD width=10%><Input type="text" name = "TxtEvent5" style="width: 100%">
</TD>
<TD width=50%><Input type="text" name = "TxtEvent6" style="width: 100%">
</TD>
</TR>
</TABLE>

alex_read
Mar 6th, 2001, 10:17 AM
Brilliant, Monte, you're a star! :)