# Assessment wanted for tables skill

**URL:** <https://discourse.mozilla.org/t/assessment-wanted-for-tables-skill/95892>\
**Category:** Learn\
**Tags:** learning, feedback, issue\
**Created:** [April 13, 2022, 12:20pm UTC](https://discourse.mozilla.org/t/assessment-wanted-for-tables-skill/95892 "2022-04-13T12:20:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Disney](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/disney/32/53705_2.png) [@Disney](https://discourse.mozilla.org/u/Disney)\
**Post date:** [April 13, 2022, 12:20pm UTC](https://discourse.mozilla.org/t/assessment-wanted-for-tables-skill/95892/1 "2022-04-13T12:20:42Z")

</div>

Under table styling so far I think I have tried done well with everything. However, I have failed to [text-align: right;] the data under the heading No’ of Albums. I would love to get some suggestions on how I can accomplish that.

Here is a link to the glitch page where I did the exercise.

> **[Glitch Code Editor ･ﾟ✧](https://glitch.com/edit/#!/enthusiastic-chivalrous-geometry)**
>
> Simple, powerful, free tools to create and use millions of apps.

And here is what the exercise look like on MDN

> **[Test your skills: Tables - Learn web development | MDN](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/Tables_tasks)**
>
> The aim of this skill test is to assess whether you understand how to style HTML tables in CSS.

Thanks Again for your Help.

---

<div class="post-metadata">

**Author:** ![schalkneethling](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/schalkneethling/32/22691_2.png) [@schalkneethling](https://discourse.mozilla.org/u/schalkneethling)\
**Post date:** [April 13, 2022, 3:05pm UTC](https://discourse.mozilla.org/t/assessment-wanted-for-tables-skill/95892/2 "2022-04-13T15:05:54Z")

</div>

Hey there,

Great work! 🎉

The reason the text is not right aligned for the number of albums is because this rule, `tbody th + td` only targets the first `td` element that is a sibling of the `th`. This means it will not affect the `td` elements under number of albums.

I [created a Codepen](https://codepen.io/schalkneethling/pen/dyJqgWR?editors=1100) based on your example. To address the problem you are facing I create a class called `numeric-cell` and applied it to all table cells where I wanted the text to be aligned right.

This also means I could remove these lines of CSS:

```
thead th:nth-child(1) {
  text-align: left;
}

thead th:nth-child(2) {
  text-align: right;
}

thead th:nth-child(3) {
  text-align: right;
}

thead th:nth-child(4) {
  text-align: left;
}

tbody th + td {
  text-align: right;
}
```

---

<div class="post-metadata">

**Author:** ![Disney](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/disney/32/53705_2.png) [@Disney](https://discourse.mozilla.org/u/Disney)\
**Post date:** [April 14, 2022, 1:32am UTC](https://discourse.mozilla.org/t/assessment-wanted-for-tables-skill/95892/3 "2022-04-14T01:32:11Z")

</div>

Hello,  
Thanks, man for the tip. This was really helpful.

---

<div class="post-metadata">

**Author:** ![schalkneethling](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/schalkneethling/32/22691_2.png) [@schalkneethling](https://discourse.mozilla.org/u/schalkneethling)\
**Post date:** [April 14, 2022, 4:30pm UTC](https://discourse.mozilla.org/t/assessment-wanted-for-tables-skill/95892/4 "2022-04-14T16:30:01Z")

</div>

You are very welcome.
