Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Border between TD and TH

Hello everyone!

I was trying to create a table by myself, but I have a problem styling it. I can't remove that space between <td>s and <th>s. Can you help me, please?

Code: https://mega.nz/#F!Wk8wDSjS!zgq6Wcyt3ZORFqRUx9HBaw

I'm looking at this but I don't understand what your question is. can you be a bit more specific?

1 Answer

Erwin Meesters
Erwin Meesters
15,088 Points

If you mean how to get rid of the standard border of the table cells, you can put this css rule on the tabel:

table {  
  border-collapse: collapse;
}

after that you can style the rows and or cell separately with borders

Thank you, Erwin. I didn't know about this CSS rule.