PathfinderWiki
Log in

Template:Columns-list

From PathfinderWiki
Template documentation (for the above template, sometimes hidden or invisible)
Smallwikipedialogo.png

This page uses content from Wikipedia. The original article was at Template:Columns-list. The list of authors can be seen in the page history. The text of Wikipedia is available under the Creative Commons Attribution-ShareAlike License.

{{Columns-list}} splits a list into columns that span the available space, and collapse automatically when there isn't enough space for separate columns. It is designed for use around lists in the body of an article, rather than in a navigation template like {{Navbox}} or content not formatted as a list. This template is based on {{Refs}}, but differs in that the list to be displayed is manually created rather than a generated list of references.

For a more flexible alternative capable of displaying arbitrary content in columns, see {{Div col}}. For component templates, see {{Column-gap}} and {{Column-rule}}.

Usage

You can specify the width of columns by using the colwidth parameter.

{{Columns-list|colwidth=15em|
* ''Text''
* ''(usually a list)''
}}

Here, colwidth specifies the width of the columns in ems, and determines dynamically the number of columns based on screen width. More columns are displayed on wider displays, and fewer on narrower displays, collapsing down to a single column if necessary.

If colwidth is not specified, the default width of 30em will be used.

This template uses CSS3 multiple-column layout, which is not supported by all Web browsers.

Examples

Simplest usage

{{Columns-list|
* Absalom
* Baalariot
* Crown Manor
* D'ziriak
* Eagle Knight of the Golden Legion
* Faceless Idol of the Hungering God
* Gaav
* Hell
}}
results in
  • Absalom
  • Baalariot
  • Crown Manor
  • D'ziriak
  • Eagle Knight of the Golden Legion
  • Faceless Idol of the Hungering God
  • Gaav
  • Hell

With CSS styles

CSS styles can also be added in addition to the colwidth parameter. For example:

{{Columns-list|colwidth=15em|style=width: 600px; font-style: italic;|
* Absalom
* Baalariot
* Crown Manor
* D'ziriak
* Eagle Knight of the Golden Legion
* Faceless Idol of the Hungering God
* Gaav
* Hell
}}
results in
  • Absalom
  • Baalariot
  • Crown Manor
  • D'ziriak
  • Eagle Knight of the Golden Legion
  • Faceless Idol of the Hungering God
  • Gaav
  • Hell

To limit the maximum number of columns displayed, you can apply the column-count CSS property, although the template will still collapse to fewer columns if the combined columns would exceed the available area—for instance, if the colwidth value is set too high for the column count. For example:

{{Columns-list|colwidth=10em|style=column-count: 3;|
* Absalom
* Baalariot
* Crown Manor
* D'ziriak
* Eagle Knight of the Golden Legion
* Faceless Idol of the Hungering God
* Gaav
* Hell
}}

renders as:

  • Absalom
  • Baalariot
  • Crown Manor
  • D'ziriak
  • Eagle Knight of the Golden Legion
  • Faceless Idol of the Hungering God
  • Gaav
  • Hell

Error messages

The presence of an equals sign within the template's content can also cause display problems and red error messages. To fix this problem, add | 1 = in front of the template's content.


Visit Template:Columns-list/doc to edit this text! (How does this work?)