0

HTML colspan?

Code is below. I'm trying to get the second row to spread across all three columns equally. Right now it just goes through only one column at a time. Any help appreciated:). <table border="2"> <tr> <td>Red</td> <td>Blue</td> <td>Green</td> </tr> <tr> <td colspan="1"><br /></td> <td>Long, Long, Maaaaan!</td> </tr> </table>

19th Jun 2019, 10:32 PM
tristach605
tristach605 - avatar
3 Réponses
+ 1
Just delete the <td>Long, Long Maaaaan!</td> and add colspan="3" to previous <td>
19th Jun 2019, 10:49 PM
Giorgos Mariettakis
Giorgos Mariettakis - avatar
+ 1
Thanks Giorgos and Robin. I wrote out (practiced) with both versions and do understand better now. Thanks again!
20th Jun 2019, 6:09 AM
tristach605
tristach605 - avatar
0
Your colspan is in the right location, but you need to set it to 3 (as it defines the number of columns it should span over) The same principle applies for rowspan/rows And assuming you want that "Long" text there, your line of code should be <td colspan="3">Long, Long, Maaaaan! </td> Hope you understand it better now
20th Jun 2019, 3:06 AM
Robin M
Robin M - avatar