Can anyone tell me what I'm doing wrong? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can anyone tell me what I'm doing wrong?

What am I doing wrong here? The second 'phone number' doesn't show up underneath the first one but rather in the bottom cell of a fourth column that seemingly comes from nowhere. <table border="2"> <tr> <td>Name</td> <td>Address</td> <td>Phone Number</td> </tr> <tr> <td bgcolor="red">Sherri</td> <td rowspan="2">5 Olive St</td> <td>555-555-5555</td> </tr> <tr> <td>Rob</td> <td></td> <td>777-777-7777</td> </tr> </table>

27th Mar 2020, 4:59 AM
Fox Ink N Pixel
3 Answers
+ 5
remove rowspan="2" https://code.sololearn.com/WudYyf0ZrSZj/?ref=app because the second cell in second row is assigned to occupy two row-cellspace, so third tr need two td only, (first td for first column, second td for third column), so the third td goes to a new column - the fourth column.
27th Mar 2020, 5:04 AM
Gordon
Gordon - avatar
+ 2
This is a second solution, if you keep rowspan, use only two td at third tr. https://code.sololearn.com/WMBN7Cc1cMQY/?ref=app Meanwhile, table is old fashioned, learn CSS Grid System instead https://code.sololearn.com/WTnC2BJ6tJKl/?ref=app https://code.sololearn.com/W4CYCf5Izf4Q/?ref=app
27th Mar 2020, 5:51 AM
Gordon
Gordon - avatar
+ 1
Gordon Thank you issue solved.
27th Mar 2020, 5:08 AM
Fox Ink N Pixel