Click here to Skip to main content
15,903,175 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
According to this: http://www.web-source.net/web_design_tips/setting_html_table_column_widths.htm#.VdzSIPm6dQI[^], setting HtmlTable column widths is as easy as:

HTML
<TD WIDTH="100">


I tried that and at first it didn't work at all, but then I thought to myself: Self, I've got to make all the cells in that column that width, too, so added the same (width="100") to them:

HTML
<td width="100"><input type="number" step="0.01" min="0" name="airfareTotalExpense" id="airfareTotalExpense"/></td>


That worked - up to a point. But when I tried reducing the width even more, it failed. So I thought maybe the input elements also needed their width set explicitly, so I added a width specifier to the input elements, too:

HTML
<td width="40"><input width="40" type="number" step="0.01" min="0" name="airfareTotalExpense" id="airfareTotalExpense"/></td>


...but it does nothing more. It stubbornly stays stuck at a too-wide width.

What is needed to force an entire column to hold its arms in and its knees together?
Posted
Updated 25-Aug-15 11:15am
v2
Comments
Sergey Alexandrovich Kryukov 25-Aug-15 19:36pm    
Stop using style attributes, always use CSS.
—SA

1 solution

HTML
<table>
  <tr>
  	<td width="254"><p>Download the  Mobile App</p></td>
    <td width="254"><p>Visit our website</p></td>
  </tr>
</table>
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900