Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
estelle committed Jun 18, 2024
1 parent 4632516 commit 448734c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions files/en-us/web/api/htmltablecolelement/align/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ The **`align`** property of the {{domxref("HTMLTableColElement")}} interface is

> **Note:** This property is deprecated, and CSS should be used to align text horizontally in a column. Use the CSS {{cssxref("text-align")}} property, which takes precedence, to horizontally align text in a column instead.
>
> As {{htmlelement("td")}} are not children of {{htmlelement("col")}}, you can't set it directly on a {{HTMLElement("col")}} element, you need to select the cells of the column using a `td:nth-child(n)` or similar (`n` is the column number).
> As {{htmlelement("td")}} are not children of {{htmlelement("col")}}, you can't set it directly on a {{HTMLElement("col")}} element, you need to select the cells of the column using a `td:nth-last-child(n)` or similar (`n` is the column number, counting from the end).
## Value

The possible values are:

- `left`
- : Align the text to the left. Use `text-align: left` instead.
- : Align the text to the left. Use `text-align: left` applied directly to the {{td}} or {{th}} instead.
- `right`
- : Align the text to the right. Use `text-align: right` instead.
- : Align the text to the right. Use `text-align: right` applied directly to the `<td>` or `<th>` instead.
- `center`
- : Center the text in the cell. Use `text-align: center` instead.

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/css/_colon_nth-child/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,12 @@ tr :nth-child(1) {
background-color: silver;
}

tbody tr td:nth-child(2) {
tbody tr :nth-child(2) {
text-align: center;
vertical-align: middle;
}

tbody tr td:nth-child(3) {
tbody tr :nth-child(3) {
text-align: right;
vertical-align: top;
background-color: tomato;
Expand Down

0 comments on commit 448734c

Please sign in to comment.