Difference between revisions of "ResponsiveTable"
From CNAC
TomHutchison (talk | contribs) m |
TomHutchison (talk | contribs) m |
||
| Line 3: | Line 3: | ||
| 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}}
