On Firefox the table headers (th) gets left aligned when you enable "Justify paragraphs" in [[Special:Preferences#mw-prefsection-rendering]] or use text-align:justify for a container. On Internet Explorer the table headers keep centered.
Expected result: The table headers should always be centered.
I think this is a bug in Firefox. The table caption (caption) is in Firefox always centered as expected.
With the following CSS definition in skins/common/commonElements.css the table headers are centered by default:
th {
text-align: center;
}
Test case:
<div style="width: 20em; float:left; margin-right:1em; border: 1px dashed silver;">
This paragraph is '''without''' <code>text-align:justify</code>.
{|
+ Long caption of the table |
- |
! th cell !! th cell with<br />two lines
- | ||
td 1 | td 2 | |
- | ||
width td cell | th cell with<br />two lines | |
} | ||
</div>
<div style="text-align: justify; width: 20em; float:left; margin-right:1em; border: 1px dashed silver;">
This paragraph is '''with''' <code>text-align:justify</code>.
{|
+ Long caption of the table |
- |
! th cell !! th cell with<br />two lines
- | ||
td 1 | td 2 | |
- | ||
width td cell | th cell with<br />two lines | |
} | ||
</div>
<div style="clear:left"/>
Version: unspecified
Severity: normal
URL: https://de.wikipedia.org/w/index.php?title=Benutzer_Diskussion:PsY.cHo&oldid=102407876#th_align.3D.22center.22