Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fixed cells on table

Status
Not open for further replies.

almoes

Programmer
Jan 8, 2003
291
US
Hi!

I have the following elements in a table:

<table>
<tr>
<td><input TYPE=&quot;Button&quot; VALUE=&quot;Connect&quot; NAME=&quot;btnDial&quot; ONCLICK=&quot;javascript:Dial()&quot;></td>
<td class=&quot;label&quot;>Status:</td><td><DIV ID=&quot;status&quot;></DIV></td>
<td><input TYPE=&quot;Button&quot; VALUE=&quot;Disconnect&quot; NAME=&quot;btnDisconnect&quot; ONCLICK=&quot;javascript:Disconnect()&quot;></td>
<td><A href=&quot;RSPmenu.asp&quot;>main</A></td>
</tr>
</table>

How can I do so all have a fixed length?? I tried everything!

thanxs,
alej
 
You need to specify a width attribute for your table/td tags. You can do this in either percentages or pixels. Specify the total width in your table tag, and then specify the individual with of each cell in the td tag.
So you could have:

<table width=&quot;700&quot;>
<tr>
<td width=&quot;20%&quot;><input TYPE=&quot;Button&quot; VALUE=&quot;Connect&quot; NAME=&quot;btnDial&quot; ONCLICK=&quot;javascript:Dial()&quot;></td>
<td width=&quot;20%&quot; class=&quot;label&quot;>Status:</td><td width=&quot;20%&quot;><DIV ID=&quot;status&quot;></DIV></td>
<td width=&quot;20%&quot;><input TYPE=&quot;Button&quot; VALUE=&quot;Disconnect&quot; NAME=&quot;btnDisconnect&quot; ONCLICK=&quot;javascript:Disconnect()&quot;></td>
<td width=&quot;20%&quot;><A href=&quot;RSPmenu.asp&quot;>main</A></td>
</tr>
</table>


Since there were 5 td tags, I just made each one 20% so they would equal 100% of the table width (700px). This is just a rough example, but it should get you started.

Hope this Helps!


 
hey thanxs! i always have such a fight to get the cells in a proper way!

cheers,
alej
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top