Help/Advice/Assessment wanted for tables skill test

Just finished the tables skill test, was wondering if my css is up to the mark, if I could have done something more efficiently or if there is anything else that is expected of me in the test. I tried to keep it as simple as possible, per the guide. One thing that still has me perplexed is whether this part was efficient, I was trying to align all the numbers columns on the right side.

tbody tr td:nth-child(2), tbody tr td:nth-child(3), thead tr th:nth-child(2), thead tr th:nth-child(3) { text-align:right; }

Here is my entire work:
JSFiddle - Code Playground

Here is the test page from MDN:
Test your skills: tables - Learn web development | MDN (mozilla.org)

Hi @Assad_Newar and welcome to the community :wave:

Congratulations, you did a great job! :medal_sports:

Pseudo-classes don’t need to be attached to a specific element. So this would do the same and is shorter:

tr :nth-child(2),
tr :nth-child(3) {
  text-align: right;
}

I hope that helps. Feel free to ask more questions. :slightly_smiling_face:

Have a nice day,
Michael

1 Like

Thanks mikoMK, I appreciate the feedback!

1 Like