Template:Columns

From OpenStreetMap Wiki
Jump to navigation Jump to search
[Edit] [Purge] Template-info.svg Template documentation

Usage

Custom width of columns (recommended)

With width in em.

  • This is just a minimum width which may be extended to fill the space not used by other columns.
  • If only one column can fit, this width will be reduced to still fit the availabel display width.
  • You may adjust easily the minimum column width according to the content of the list if you know their maximum width if you want to compact the list a bit more when list items are very narrow.
  • For a list of location names, an average of 18em is good and fits well on small screens for almost all practical cases, as in the following example.
{{Columns|width=18|1=
* testing with average item # 1
* testing short item #2
* testing average item #3
* testing average item #4
* testing average item #5
* testing average item #6
* testing average item #7
* testing average item #8
* testing average item #9
* testing average item #10
* testing average item #11
* testing average item #12
* testing average item #13
* testing with a bit longer item #14
* testing average item #15
* testing average item #16
* testing average item #17
* testing average item #18
* testing average item #19
* testing average item #20
* testing average item #21
* testing average item #22
* testing average item #23
* testing average item #24
}}

produces:

  • testing with average item # 1
  • testing short item #2
  • testing average item #3
  • testing average item #4
  • testing average item #5
  • testing average item #6
  • testing average item #7
  • testing average item #8
  • testing average item #9
  • testing average item #10
  • testing average item #11
  • testing average item #12
  • testing average item #13
  • testing with a bit longer item #14
  • testing average item #15
  • testing average item #16
  • testing average item #17
  • testing average item #18
  • testing average item #19
  • testing average item #20
  • testing average item #21
  • testing average item #22
  • testing average item #23
  • testing average item #24

Custom number of columns (not recommended)

This is not recommended even if items in the list are very narrow:

  • On narrow display, too many columns specified (even if you set only 2 columns) may not work correctly, causing most of them to wrap needlessly; they could even overflow partly on the next column if items can't wrap, or could easily go out of the available display width on the last column(s), adding an unconvenient horizontal bar to see the end of the list.
  • On large displays, the columns will frequently be much too large, when we could fit more columns and then could avoid the reader having to scroll down to read the whole list at once due to column height exceeding the display height.
{{Columns|number=4|1=
* testing with average item # 1
* testing short item #2
* testing average item #3
* testing average item #4
* testing average item #5
* testing average item #6
* testing average item #7
* testing average item #8
* testing average item #9
* testing average item #10
* testing average item #11
* testing average item #12
* testing average item #13
* testing with a bit longer item #14
* testing average item #15
* testing average item #16
* testing average item #17
* testing average item #18
* testing average item #19
* testing average item #20
* testing average item #21
* testing average item #22
* testing average item #23
* testing average item #24
}}

produces:

  • testing with average item # 1
  • testing short item #2
  • testing average item #3
  • testing average item #4
  • testing average item #5
  • testing average item #6
  • testing average item #7
  • testing average item #8
  • testing average item #9
  • testing average item #10
  • testing average item #11
  • testing average item #12
  • testing average item #13
  • testing with a bit longer item #14
  • testing average item #15
  • testing average item #16
  • testing average item #17
  • testing average item #18
  • testing average item #19
  • testing average item #20
  • testing average item #21
  • testing average item #22
  • testing average item #23
  • testing average item #24

See also