There is a lot of confusion about spanning columns and rows.
You should have an entry for every cell in your table. If your table has 3 columns, you should have 3 entries for each row, or use row or column spanning to join cells.
Sometimes you want 2 or more adjoining cells in the table to be merged so the content can cross these “spanned” cells. You tell the browser which cells to display as one big cell, rather than the individual cells.
Several people got colspan working but there is some conflicting code for that.
Row span isn’t displaying correctly. Try making a simpler table with just the colspan and rowspan attributes so you can really see how this works.
| 1 | - - 2 - - | - - 3 - - | - - 4 - - - |
| 2 | . . . colspan . . . . | - - - - - - |
| 3 | - - - - - | - - - - - | ... row ... |
| 4 | - - - - - | - - - - - | ... span .. |
| 5 | - - - - - | - - - - - | - - - - - - |
colspan – join row 2, columns 2 and 3
rowspan – join column 4, row 3 and 4
Keep it simple so you really understand what is happening.
When you are struggling with a problem, try creating a new web page with just the code you are working on.
Some of your web pages have gotten really complex. This is good, in that it demonstrates that you have learned a lot. It s bad, in that you are making it hard to know what is working and what isn’t.
Browsers are remarkably clever at figuring out what you are doing, even if you are doing it badly. Things will appear to work, even though you have made several mistakes. If you just keep adding more code, you eventually run into a situation where something really bad happens – like nothing displays, because the browser was so confused, it just could not figure out what to display.
These last few topics are simple compared to the earlier topics. Now would be a good time to go back and sort out your code.
Start with an empty page. Just do the Tables assignment WITHOUT your internal style sheet code. Add one thing at a time. You should be able to build your styling back. However, you may discover that you have code that doesn’t work the way you thought it did. This is a good time to find that out.
There is a whole section in Willard about Troubleshooting – Appendix C p.455.