Skip to content

Commit

Permalink
Apply suggestion for colgroup element
Browse files Browse the repository at this point in the history
Co-authored-by: Estelle Weyl <[email protected]>
  • Loading branch information
glmvc and estelle authored Jan 25, 2024
1 parent 22ff62d commit b5c8f10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/colgroup/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The following attributes are deprecated and should not be used. They are documen

> **Note:** Setting `vertical-align` on the `<colgroup>` element has no effect as {{HTMLElement("td")}} and {{HTMLElement("th")}} elements are not descendants of the `<colgroup>` element, and therefore they do not inherit from it.
>
> If the table does not use a [`colspan`](/en-US/docs/Web/HTML/Element/td#colspan) attribute, use the `td:nth-of-type(an+b)` CSS selector per column, where `a` is the total number of the columns in the table and `b` is the ordinal position of the column in the table, e.g. `td:nth-of-type(7n+2) { vertical-align: middle; }` to center the second column cells vertically.
> If the table does not use a [`colspan`](/en-US/docs/Web/HTML/Element/td#colspan) attribute, use the [`td:nth-of-type()`](/en-US/docs/Web/CSS/:nth-of-type) CSS selector per column, e.g. `td:nth-of-type(2) { vertical-align: middle; }` to center the second column cells vertically.
>
> If the table does use a [`colspan`](/en-US/docs/Web/HTML/Element/td#colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.
Expand Down

0 comments on commit b5c8f10

Please sign in to comment.