Template:Columns

From Starfield Wiki
Jump to: navigation, search

Summary[edit]

This template constructs a multicolumn layout, with column width, column count, or preferably both specified.

Parameters[edit]

Columns
Parameter Scope Description
width optional Specifies the target width for each column. Browsers may make columns wider or narrower to fit. Percentage (%) units don't work; use em, px, vw, etc. Required if count not given.

Default: Width is automatically calculated, based on the specified count and the size of the viewport. Be aware that this may overflow narrow viewports.

count optional Specifies the number of columns. Required if width not given. If both width and count are given, count specifies the maximum number of columns.

Default: Count is automatically calculated, based on the specified width and the size of the viewport. Be aware that many columns may be generated in wide viewports.

id optional If specified, an HTML id to assign to the container.

Default: The container has no id.

class optional If specified, additional HTML classes to assign to the container.

Default: The container has only the columns class.

style optional If specified, additional CSS declarations to apply to the container.

Default: The container has only columns and display declarations.

1 required The content to lay out in columns.

Examples[edit]

Specified width, maximum count (recommended)[edit]

{{columns|width=10em|count=4|
* Altmer (High Elf)
* Argonian
* Bosmer (Wood Elf)
* Breton
* Dunmer (Dark Elf)
* Imperial (Cyrodiil)
* Khajiit
* Nord
* Orsimer (Orc)
* Redguard
}}
  • Altmer (High Elf)
  • Argonian
  • Bosmer (Wood Elf)
  • Breton
  • Dunmer (Dark Elf)
  • Imperial (Cyrodiil)
  • Khajiit
  • Nord
  • Orsimer (Orc)
  • Redguard

This constrains the number of columns in wide viewports, while preventing columns from getting too cramped in narrow viewports.

Specified width, auto count[edit]

{{columns|width=10em|
* Altmer (High Elf)
* Argonian
* Bosmer (Wood Elf)
* Breton
* Dunmer (Dark Elf)
* Imperial (Cyrodiil)
* Khajiit
* Nord
* Orsimer (Orc)
* Redguard
}}
  • Altmer (High Elf)
  • Argonian
  • Bosmer (Wood Elf)
  • Breton
  • Dunmer (Dark Elf)
  • Imperial (Cyrodiil)
  • Khajiit
  • Nord
  • Orsimer (Orc)
  • Redguard

Note that this generates many columns in wide viewports. If count cannot be given, display problems in wide viewports can be mitigated by specifying a larger width.

Specified count, auto width[edit]

{{columns|count=4|
* Altmer (High Elf)
* Argonian
* Bosmer (Wood Elf)
* Breton
* Dunmer (Dark Elf)
* Imperial (Cyrodiil)
* Khajiit
* Nord
* Orsimer (Orc)
* Redguard
}}
  • Altmer (High Elf)
  • Argonian
  • Bosmer (Wood Elf)
  • Breton
  • Dunmer (Dark Elf)
  • Imperial (Cyrodiil)
  • Khajiit
  • Nord
  • Orsimer (Orc)
  • Redguard

Note that this generates narrow columns, and possibly horizontal overflow, in narrow viewports. If width cannot be given, display problems in narrow viewports can be mitigated by specifying a smaller count.

This page uses material from the UESP article "Template:Columns".