Hi everyone, I’m working on the “Spanning Columns” exercise in the HTML course (Third Module, Page 7) and I’m running into a problem. The instructions ask me to use colspan="2"
in a table row, ( 1. In index.html, span a <td>
element across two columns.) but when I apply it, I’m unable to display all the necessary information without either omitting a piece of data or adding an extra column. For example, I want to show both the company name and the number of items to ship, along with additional info, but the colspan
requirement seems to break the table layout. The official solution to the exercise also breaks the table, and it is accepted. Has anyone else encountered this issue or found a way to solve it while following the exercise requirements? Am I missing something here? Thanks in advance!
Line 26 should not have a colspan
attribute, but if we were asked to include one it might be for the purpose of illustrating the effect on only the row to which it is applied, or more specifically, only the TD it is applied to.
Take each lesson in stride as this might sometimes be the intention: To see something break, and then zero in on what the cause was. In this case that is easy to see.
2 Likes
Hey, thanks for the answer! And yeah, you were right, I should have kept going until the end, eventually the lesson will erase the colspan attribute on their code and the table will be fixed. A little confusing but it is what it is.
1 Like