Examples/Parameter: columns (example 1): Difference between revisions
< Examples
Content added Content deleted
imported>FrozenPlum (This is a very non-ideal way to do this... but for this example it's necessary. Did my best to explain it, this is a workaround rather than a proper example anyhow.) |
imported>FrozenPlum m (simplify) |
||
Line 6:
==Example==
This will list articles in [[:Category:Fruit examples]]
{{note|'''Note:''' This example uses a '''workaround'''; a [https://www.w3schools.com/tags/tag_div.asp div] tag is used to wrap ''around'' the DPL3 statement, applying [https://www.w3schools.com/cssref/css3_pr_column-count.asp CSS column-count], to make the example function as described.}}
Line 14:
{{#dpl:
|category = Fruit examples
|columns = 3
|rowcolformat = width=100%
Line 27 ⟶ 26:
{{#dpl:
|category = Fruit examples
|columns = 3
|rowcolformat = width=100%
Line 36 ⟶ 34:
[[Category:Controlling output format (examples)]]
[[Category:Uses category parameter]]
[[Category:Uses columns parameter]]
[[Category:Uses rowcolformat parameter]]
|
Revision as of 05:22, 24 April 2022
Example
This will list articles in Category:Fruit examples, arranged in 3 columns, the rowcolformat
is used to make the width 100%.
<div style="-webkit-column-count:3; column-count:3;"><!-- workaround start --> {{#dpl: |category = Fruit examples |columns = 3 |rowcolformat = width=100% |count = 3 }} </div><!-- workaround end -->
Result
{{#dpl:
|category = Fruit examples |columns = 3 |rowcolformat = width=100% |count = 3
}}