Template

Difference between revisions of "ResponsiveTable"

From CNAC

(Created page with "<includeonly>{{#switch: {{{1|}}} | start = <div style="overflow-x:auto;margin-bottom:1rem;"> | end = </div> | Use start or end as a parameter, <tt><nowiki>{{ResponsiveTable...")
 
m
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
  | start = <div style="overflow-x:auto;margin-bottom:1rem;">
 
  | start = <div style="overflow-x:auto;margin-bottom:1rem;">
 
  | end = </div>
 
  | end = </div>
  | Use start or end as a parameter, <tt><nowiki>{{ResponsiveTable|start}} or {{ResponsiveTable|end}}<nowiki></tt>.
+
  | {{-}}Use start or end as a parameter, <tt><nowiki>{{ResponsiveTable|start}} or {{ResponsiveTable|end}}</nowiki></tt>.{{-}}
}}</includeonly>
+
}}</includeonly><noinclude>
 +
This template wraps a table in an auto overflow-x axis div to allow wide tables to be scrolled on mobile, tablet and desktop devices. The following is the code used to insert the div container.
 +
<pre>
 +
{{#switch: {{{1|}}}
 +
| start = <div style="overflow-x:auto;margin-bottom:1rem;">
 +
| end = </div>
 +
| {{-}}Use start or end as a parameter, <tt><nowiki>{{ResponsiveTable|start}} or {{ResponsiveTable|end}}</nowiki></tt>.{{-}}
 +
}}
 +
</pre>
 +
To use the template use '''start''' or '''end''' as the 1st parameter at the beginning and the end of a table. <tt><nowiki>{{ResponsiveTable|start}} or {{ResponsiveTable|end}}</nowiki></tt>

Latest revision as of 12:52, 16 March 2020

This template wraps a table in an auto overflow-x axis div to allow wide tables to be scrolled on mobile, tablet and desktop devices. The following is the code used to insert the div container.

{{#switch: {{{1|}}}
 | start = <div style="overflow-x:auto;margin-bottom:1rem;">
 | end = </div>
 | {{-}}Use start or end as a parameter, <tt>{{ResponsiveTable|start}} or {{ResponsiveTable|end}}</tt>.{{-}}
}}

To use the template use start or end as the 1st parameter at the beginning and the end of a table. {{ResponsiveTable|start}} or {{ResponsiveTable|end}}