Frae Wikipedia, the free beuk o knawledge
Jump to navigation Jump to search

Usage[eedit soorce]

At its simplest:


Alternatively, using {{stack begin}} and {{stack end}}:

{{stack begin}}
{{stack end}}

The <object> may simply be a string of wikicode for many images/templates.

Optional parameters[eedit soorce]

{{stack| <object(s)> | float=left or right | clear=true or false}}


{{stack begin | float=left or right | clear=true or false}}


  • float= left or right (default is right)
    This option can be used to float the stack to the left or right of the page
  • clear= true or false (default is false)
    This option can be used to force the stack to the far left or right (e.g., near an infobox).

You can also explicitly list multiple arguments:

{{stack| float=left or right | clear=true or false
|2=<object(s)>, etc. up to 9 parameters in the current version
  • This multiple argument version does include extra vertical whitespace between each (set of) <object(s)>.

Floating portal boxes[eedit soorce]

{{Stack}} can be used to float a portal box beside an infobox (or other right-aligned item) when other methods might not work as anticipated.


line 1
line 2
line 3
line 4
line 5
line 6
line 7
line 8
line 9

Test image

This is a wikitable serving as a typical left-aligned table. The overlap on left-aligned tables had been a frequent problem when other boxes nearby were set to "float:right". So this is a test of how well a floating portal-box would avoid overlapping onto a left-side table.

The example here uses {{stack}} to float two portal boxes (Animals, Cats) as follows:

{{stack |{{portal|Animals}}{{portal|Cats}} }}

The two portal-boxes are stacked and floated together by both being listed as {{stack}}'s (first) parameter. Because the infobox and image were also stacked together, {{stack}} moved the two portal-boxes alongside the infobox despite their being specified after the image.

Normally, a portal-box would be stuck below the Mona Lisa image, causing this entire text section to format further below, and causing a large text-gap of empty whitespace to appear near the infobox. There is no limit to the number of portalboxes (or Commonscat boxes) which can be listed within a {{stack}} call, such as in a stub or an article with many stacked images near the bottom. Using {{stack}} is extremely efficient, due to being a short template which uses builtin tag <table> to float the boxes.

Stack template faimily[eedit soorce]

Tracking category[eedit soorce]

See an aw[eedit soorce]

  • {{Multiple image}}, providing both vertical and horizontal layouts for multiple images.
  • {{Superimpose}}, which places one image over another.
  • {{Superimpose2}}, which can place up to fifty image layers over one another.

No description.

Template parameters

No parameters specified