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!!!!!!!!!!!!! Link to comment https://forums.phpfreaks.com/topic/241622-help-with-colspan-ahhhhhhhhhhh/ 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. Link to comment https://forums.phpfreaks.com/topic/241622-help-with-colspan-ahhhhhhhhhhh/#findComment-1241035 Share on other sites More sharing options...
DataSpy Posted July 11, 2011 Author Share Posted July 11, 2011 Fixed, I'm a dumbass, thanks!!!!!!!!!!!!!!!!!!!!!!! Link to comment https://forums.phpfreaks.com/topic/241622-help-with-colspan-ahhhhhhhhhhh/#findComment-1241040 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> Link to comment https://forums.phpfreaks.com/topic/241622-help-with-colspan-ahhhhhhhhhhh/#findComment-1241122 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. Link to comment https://forums.phpfreaks.com/topic/241622-help-with-colspan-ahhhhhhhhhhh/#findComment-1241125 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.