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 8ec3b6b commit 3429d4f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions files/en-us/web/api/htmltablecaptionelement/align/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ Use CSS `text-align` instead. An [example](/en-US/docs/Web/CSS/text-align#table_
## See also

- {{cssxref("text-align")}}
- {{cssxref("caption-side")}}
- [Styling tables](/en-US/docs/Learn/CSS/Building_blocks/Styling_tables)
4 changes: 4 additions & 0 deletions files/en-us/web/api/htmltablerowelement/align/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ The possible values are:
- : Align the text to the right. Use `text-align: right` instead.
- `center`
- : Center the text in the cell. Use `text-align: center` instead.
- `justify`
- : Spread the text across the cell. Use `text-align: justify` instead.
- `char`
- : Never fully supported, align text to a specified character. Use `text-align: <string>,` where the string is a single character, when supported.

## Examples

Expand Down
10 changes: 6 additions & 4 deletions files/en-us/web/css/text-align/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ The inconsistent spacing between words created by justified text can be problema
This example demonstrates the use of `text-align` on {{htmlelement("table")}} elements:

- The {{htmlelement("caption")}} is set to right-aligned.
- The first two {{htmlelement("th")}} elements use the default (left) alignment, while the third is set to right-aligned.
- The first two {{htmlelement("th")}} elements inherit the left alignment from the `text-align: left` set on the {{htmlelement("thead")}}, while the third is set to right-aligned.
- Inside the {{htmlelement("tbody")}} element, the first row is set to right-aligned, the second is set to center-aligned, and the third uses the default (left) alignment.
- Within each row, some cells (c12, c31) are set to override the alignment of the row.

Expand All @@ -170,9 +170,11 @@ This example demonstrates the use of `text-align` on {{htmlelement("table")}} el
Example table
</caption>
<thead>
<th>Col 1</th>
<th>Col 2</th>
<th class="right">Col 3</th>
<tr>
<th>Col 1</th>
<th>Col 2</th>
<th class="right">Col 3</th>
</tr>
</thead>
<tbody>
<tr class="right">
Expand Down

0 comments on commit 3429d4f

Please sign in to comment.