Help:Table/Width: Difference between revisions

Content deleted Content added
Line 57:
Experiment with em and other width settings on another page outside Wikipedia:
*[https://www.w3schools.com/html/html_table_sizes.asp HTML Table Sizes].
 
== CSS width on table header cell ==
 
CSS width for a table header cell acts like a max-width setting. So it shrinks as browser window shrinks. It shrinks proportionally on mobile, too. No horizontal scrollbar in either mode.
 
'''Center header width setting:'''
:<code>! Left !! style=width:40em | Center !! Right</code>
 
{| class=wikitable
|-
! Left !! style=width:40em | Center !! Right
|-
| Top left cell || Top center cell || Top right cell
|-
| Middle left cell || Middle center cell || Middle right cell
|-
| Bottom left cell || Bottom center cell || Bottom right cell
|}
 
== CSS width on table as a whole ==