+ 1

Problem related table in html.

Hello, I'm facing a problem while creating a table. You have to make a table similar to this. https://ibb.co/yfs2rfj Here's what I've tried: https://www.sololearn.com/compiler-playground/WlKx7qO01ffq Idk why my code is not working . The 3 inside cell should colspan 3 columns but it's doing only 2 columns.Maybe I'm doing something wrong but I don't know what.Thanks for your help.

14th Oct 2022, 7:29 PM
The future is now thanks to science
The future is now thanks to science - avatar
5 Answers
+ 2
I looked at your picture a bit longer and discovered that you need 6 columns and 5 rows. Then you can get your colspans and rowspans to work correctly. Also I made a better example with some notes because the first one didn't seem to help so much. https://code.sololearn.com/W3YObxsQO2hF/?ref=app
15th Oct 2022, 4:31 AM
Chris Coder
Chris Coder - avatar
+ 1
It is because you do not have enough columns to span 3. https://code.sololearn.com/WhRY364sO6KX/?ref=app
15th Oct 2022, 12:31 AM
Chris Coder
Chris Coder - avatar
0
Chris but I have a question when I remove the first part like the first column from every row the table collapse.But why? https://code.sololearn.com/W5skeK7ed5pj/?ref=app
31st Oct 2022, 9:35 PM
The future is now thanks to science
The future is now thanks to science - avatar
0
The border is set to collapse in the CSS it removes the space between cells. But I don't quite understand what you mean by collapse.
1st Nov 2022, 3:33 AM
Chris Coder
Chris Coder - avatar
0
@Chris What I mean is, there should be 5 rows in total but it becomes only 4 rows and 6,7,8,9 cells come into the same row.
1st Nov 2022, 12:24 PM
The future is now thanks to science
The future is now thanks to science - avatar