23 Comments
User's avatar
Romola Chrzanowski's avatar

https://codepen.io/romola/pen/yLMjKgX?editors=1100

I copied CSS freely from MDN and have an issue to resolve. I am getting what looks like double borders in some places so this needs something to make all borders the same.

Jen Kramer's avatar

table {

border-collapse: collapse;

}

This is what gives you a single border within the table. Otherwise you have double borders everywhere.

Jen Kramer's avatar

🔥🔥🔥🔥🔥🔥 Looks great, nice job! You can always move that inline style out using a class. 😁

kajal's avatar

Yeah 🤠👍

K Dickenson's avatar

https://codepen.io/kldickenson/pen/WNRqXGK

Being a web dev in higher ed, we have to deal with tables like these all the time! For the decade I have been doing this, I still don't know if I have come up with an ideal solution.

Jen Kramer's avatar

🔥🔥🔥🎉🎉🎉 Because you have headers in columns and rows, I'd be tempted to add a scope to those <th scope="row">. But other than that, I think you've got it! Great work 😁

Jen Kramer's avatar

🔥🔥🔥🎉🎉🎉 OK, good first pass at this! Every row should have the same number of cells. Looks like most rows have 2 cells, so the first row should have td colspan="2" instead of 5. Great start!

Jen Kramer's avatar

🔥🔥🔥🔥🔥🔥 Lovely job! What happens if they eat lunch every day? 🤣 You'll want to revisit this in later days as we talk about more complex headers for tables. You have the right idea here, but there's some more HTML needed to properly communicate these headers. Great stuff as always!

Jen Kramer's avatar

Ooh, you got an :nth-child in there! 🔥🎉🔥🎉🔥🎉 Great start on this - the next challenge is similar, but the information is grouped somewhat differently. Looking forward to what you might do next!

Jen Kramer's avatar

🔥🎉🔥🎉🔥🎉 I laughed at your comment about <time> -- it may not be useful, I agree! 😁 You've done an excellent job with colspan and rowspan. While quotes are not necessarily required in HTML around attribute values, they are something of a convention. You may want to revisit this pen in a few days once we've gone through more information about headers, captions, and designating groups of columns. Thanks for sharing!

maeyler's avatar

I have been following your great work since April 6. I appreciate your sharing useful information accurately and doing it 30 times in a month! Both require hard work.

Jen Kramer's avatar

Thank you! Erika and I have learned so much in this process. Perhaps the biggest lesson learned is that 30 days may be about 15 days too many. 🤣🤣🤣 However, we are thinking about what comes next. Thank you so much for reading and participating!

Jen Kramer's avatar

🔥🎉🔥🎉🔥🎉 Nicely done! Don't forget your closing </table> tag. Do you think you could combine your table a bit more as maeyler did in his pen above? Thanks for sharing!

Marta's avatar

https://codepen.io/idlehands1969/pen/WbQMMMm?editors=0100

When I first started figuring out html and css, tables were one of the first things I learned. I had discovered the dev tools in my browser and was fascinated by the foreign language I saw. Tables were fairly easy for my brain to comprehend compared to some of the other layouts.

User's avatar
Comment deleted
Apr 22, 2021
Comment deleted
Jen Kramer's avatar

🔥🎉🔥🎉🔥🎉🔥🎉🔥🎉🔥🎉 Love it!!! Love the CSS treatment for cells where you have no data. You rightly included the cell despite a lack of information. Great job!