genius_geek
asked on
<table>
Hi I have the following structure for my <table> tag
6 rows
row1 has 2 columns
row 2 has 2 columns
row 3 has 6 columns
row 4 has 6 columns
row 5 has 5 columns
row 6 has 5 columns
The problem i am having is, the columns are of different width. I want the columns to be aligned in each row. This is not happening.
I used colspan=5 Does not help for row 2 column 2.
Is there a better way to align columns with different widths?
6 rows
row1 has 2 columns
row 2 has 2 columns
row 3 has 6 columns
row 4 has 6 columns
row 5 has 5 columns
row 6 has 5 columns
The problem i am having is, the columns are of different width. I want the columns to be aligned in each row. This is not happening.
I used colspan=5 Does not help for row 2 column 2.
Is there a better way to align columns with different widths?
ASKER
i tried that. I will tell you why it does not work.
row 2 has two input type=text (column1 and column2) each textbox with size is 25
row 4 has 6 textboxes, 1st with size 25, 2nd 3rd 4th with size 2, 5th and 6th with size 7
in the above mentioned case, r2c2 and r2c3 will be faaaaaar apart. how would you solve that?
row 2 has two input type=text (column1 and column2) each textbox with size is 25
row 4 has 6 textboxes, 1st with size 25, 2nd 3rd 4th with size 2, 5th and 6th with size 7
in the above mentioned case, r2c2 and r2c3 will be faaaaaar apart. how would you solve that?
ASKER
also 1st and 2nd row is spilt as 1,5 and not 3,3
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
have to try to align the field to the left:
<style type="text/css">
td {text-align:left;"}
</style>
<style type="text/css">
td {text-align:left;"}
</style>
<tr>
<td colspan="3"></td>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="3"></td>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="1"></td>
<td colspan="1"></td>
<td colspan="1"></td>
<td colspan="1"></td>
<td colspan="1"></td>
<td colspan="1"></td>
</tr>
<tr>
<td colspan="1"></td>
<td colspan="1"></td>
<td colspan="1"></td>
<td colspan="1"></td>
<td colspan="1"></td>
<td colspan="1"></td>
</tr>
<tr>
<td colspan="2"></td>
<td colspan="1"></td>
<td colspan="1"></td>
<td colspan="1"></td>
<td colspan="1"></td>
</tr>
<tr>
<td colspan="2"></td>
<td colspan="1"></td>
<td colspan="1"></td>
<td colspan="1"></td>
<td colspan="1"></td>
</tr>
</table>