DataSpy Posted July 11, 2011 Share Posted July 11, 2011 I'm wondering if it's possible to have one row in a table have one column, another row have 3 columns, and a third row have two columns? row 1 = 1 col row 2 = 3 col row 3 = 2 col example on my website here == http://www.data-spy.net/columns.html as you can see in the example the last column doesn't go all the way over <html> <head> <title>Columns suck!</title> </head> <body> <table width="50%" border="1"> <tr> <td colspan="3"> row 1 - 1 column - c1 </td> </tr> <tr> <td> row 2 - 3 columns - c1 </td> <td> c2 </td> <td> c3 </td> </tr> <tr colspan="2"> <td> row 3 - 2 columns - c1 </td> <td> c2 </td> </tr> </table> </body> </html> Any help greatly appreciated, thanks in advance!!!!!!!!!!!!! Quote Link to comment Share on other sites More sharing options...
chaseman Posted July 11, 2011 Share Posted July 11, 2011 In the third row, you could change the colspan to 3. Or you could put the first td to colspan 2 and the second td to 1. Sometimes it is better to put the colspan attribute into the td rather than tr, but it depends on what you're looking for and how you want the cells to be spaced out. Quote Link to comment Share on other sites More sharing options...
DataSpy Posted July 11, 2011 Author Share Posted July 11, 2011 Fixed, I'm a dumbass, thanks!!!!!!!!!!!!!!!!!!!!!!! Quote Link to comment Share on other sites More sharing options...
webtechie Posted July 11, 2011 Share Posted July 11, 2011 Colspan 3 in row 1 and colspan 2 in row 3. <table width="50%" border="1"> <tr> <td colspan="3"> row 1 - 1 column - c1 </td> </tr> <tr> <td> row 2 - 3 columns - c1 </td> <td> c2 </td> <td> c3 </td> </tr> <tr colspan="2"> <td> row 3 - 2 columns - c1 </td> <td colspan="2"> c2 </td> </tr> </table> Quote Link to comment Share on other sites More sharing options...
chaseman Posted July 11, 2011 Share Posted July 11, 2011 ^ I did not try your example, but I think it would not work if you don't have the 3rd row's colspan on 3. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.