Skip to content

fix(learn): wrap table rows in <tbody> #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2022
Merged

fix(learn): wrap table rows in <tbody> #41

merged 1 commit into from
Jul 27, 2022

Conversation

azerum
Copy link
Contributor

@azerum azerum commented Jun 11, 2021

Firefox implicitly inserts <tbody> element to the table displayed on the page, while editable html doesn't include it.

In the task you need to select every other row of the table without modifying html. One way to do that is to write following selector:

table > th:nth-child(2n + 1) {
}

But because <tr> is wrapped in <tbody>, this selector doesn't work and it's not obvious why without looking in browser inspector.

I just wrapped all rows in <tbody> so you can see it in editable html.

Firefox implicitly inserts \<tbody\> element to the table displayed on the page, while editable html doesn't include it.

In the task you need to select every other row of the table without modifying html. One way to do that is to write following selector:
```
table > th:nth-child(2n + 1) {
}
```
But because \<tr\> is wrapped in \<tbody\>, this selector doesn't work and it's not obvious why without looking in browser inspector.

I just wrapped all rows in \<tbody\> so you can see it in editable html.
@estelle estelle merged commit f654ff6 into mdn:main Jul 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants