98 Percent Table Width Anomaly

The 98 percent table width anomaly is an issue of some tables (since 2008, as of May 2012) with class=wikitable table-responsive or class=infobox triggering the bottom scroll bar when width is set above 98%.

The over-wide display has been caused by automatic extra-margin padding, as either: wider margin-right for class=wikitable table-responsive , or wider margin-left for infoboxes. This issue is about the top-level tables on a page, not about tables (with width=100%) inside other tables. Perhaps the full-name of the essay could be: "98-percent table-width anomaly triggering bottom scroll-bars for top-level, CSS-class tables". The problem does not occur for other tables, without the keyword "class="duhoc-en . For "class=wikitable table-responsive " the addition of style="margin-right:0" allows a table to fill the current width of the reader's window, and bypass the 98% width limitation.

Overwide wikitable table-responsive s

Normally, a plain table (with no "class="duhoc-en ) can be sized to any width up to "100%" without triggering a bottom scrollbar. However, the styles for "class=wikitable table-responsive " or "wikitable table-responsive sortable" have added an implicit right-side margin-right padding that fits okay up to 98% width. When sized to 99% or 100%, those class=wikitable table-responsive formats have triggered a bottom scrollbar (since 2008, as of June 2009), appearing along the bottom of the window. To avoid this situation, use:

          class=wikitable table-responsive   style="width:99%; margin-right:0"

The option for "margin-right:0" removes the right-side margin padding outside the box, rather than having a margin of 1em or 20px, or such.

Note that a full-screen table of width=101% (or higher), always triggers a bottom scrollbar, as expected, because 101%>100 (the full window width).

Overwide infoboxes

Normally, a plain box table (with no "class="duhoc-en ) can be sized to any width up to "100%" without triggering a bottom scrollbar. However, the various styles for "class=infobox" add an implicit left-side margin-left padding that fits okay up to 98% width. When sized to 99% or 100%, those class=infobox formats have triggered a bottom scrollbar (since 2008, as of March 2009), appearing along the bottom of the window. To avoid this situation, use:

          class=infobox   style="width:99%; margin-left:0"

The option for "margin-left:0" removes the left-side margin padding outside the infobox, rather than having a margin of 1em or 20px, or such.

Anomaly versus bug

Although some might wish to consider the default limitation of CSS-class tables (to width=98%) as a bug, when tables are nested within other tables, then a wikitable table-responsive of 100%-width will still add the same right-side padding as at width 50%, 80% or 98%. The problem of over-wide tables occurs at the top level, when 100% is the entire window, with no "outside space" to have padded. Because of the relative viewpoint, the situation is termed an "anomaly". One editors's bug is another editor's "clever feature" when the padding is added inside other tables, when formatting a table-within-a-table, etc.

The issue of determining "top-level tables" is complicated by the use of templates: a table coded inside a template might seem to be a top-level table. However, if the template were invoked inside an outer table, then the result would generate nested tables. Instead, the table padding generated by the template is the same, whether viewing the template in stand-alone mode, or when transcluded into another page. A similar complex issue is the use of subheaders ("==Subheader==") inside a template, and determining which page contains that labeled section for editing, because appearing on a formatted page does not mean the heading exists inside that page, just inside the template displayed for that page. These problems of nesting are related to side-effects of recursion.

Plain tables not affected

As a final reminder: The scrollbar problem only occurs for top-level tables in CSS classes, such as class=wikitable table-responsive or class=infobox. A plain table (with no "class="duhoc-en ) can be resized up to 100% without triggering a bottom scrollbar.

Examples

The 2 wikitable table-responsive s below show the increased width, when the option is added to set: style="margin-right:0". This difference in width has occurred since 2008, and setting the margin is a reliable option to allow wider tables.

Format when class=wikitable table-responsive :

This is a test of the default settings for a very wide table with much text to show the extent of the margins when enough data is present to push the table to its maximum width allowed by the table properties. A table with long text, or many wide columns, will expand to fit 98% of the width of the window. Again, this is the default width in this table.

Format when class=wikitable table-responsive style="margin-right:0":

This is a test of style="margin-right:0" to override the default settings for an extra-wide table with much text to show the extent of the margins when enough data is present to push the table to its maximum width allowed by the table properties. A table with long text, or many wide columns, will expand to fit the full width (100%) of the window.
Again, this is the width with style="margin-right:0".

See also

Tags:

98 Percent Table Width Anomaly Overwide wikitable table-responsive s98 Percent Table Width Anomaly Overwide infoboxes98 Percent Table Width Anomaly Anomaly versus bug98 Percent Table Width Anomaly Plain tables not affected98 Percent Table Width Anomaly Examples98 Percent Table Width Anomaly

🔥 Trending searches on Wiki English:

Ruth KearneyList of dates for EasterBharatiya Janata PartyThree-BodyGoogle MapsCristiano RonaldoLionel MessiKim PorterMukhtar Ahmed AnsariRiver PhoenixAnyone but YouYouTubeDark webIndiaJimmy Jean-LouisJohn Bradley (English actor)Endrick (footballer, born 2006)LentMillennialsJapanThe Goat LifeList of countries by GDP (nominal) per capitaTiger WoodsUsher (musician)Ricky MartinNavneet Kaur RanaGoat Days123MoviesFormula OnePoor Things (film)Ku Klux KlanJohn McAfeeSandra BullockAnna SawaiMel GibsonWorld War IIMyanmarPassoverRusso-Ukrainian WarPeaky Blinders (TV series)Jude BellinghamGuy RitchieMartin ScorseseStations of the CrossFatal insomniaOnce Upon a Time in HollywoodRobert F. KennedyWrestleMania XLAngelina JolieNATOKevin DurantPelican eelList of constituencies of the Lok SabhaKhabib NurmagomedovChalino SánchezYellowstone (American TV series)Barkley MarathonsFábián MarozsánCassie VenturaDonald TrumpChennai Super KingsPremier LeagueSpatulaAdam NeumannMichael SchumacherSiddharth (actor)Conor McGregorMalaysiaKillers of the Flower Moon (film)Lee GreenwoodRachel McAdamsKwena MaphakaList of Marvel Cinematic Universe filmsList of countries and dependencies by populationTokyo Vice (TV series)Indian Premier League🡆 More