For faster navigation, this Iframe is preloading the Wikiwand page for ފަންވަތް:Stack.

ފަންވަތް:Stack

Documentation icon ފަންވަތް ޑޮކިއުމަންޓޭޝަން[view] [edit] [history] [ޕާރޖް]

At its simplest:

((stack|<objects>))

Alternatively, using ((stack begin)) and ((stack end)):

((stack begin))
<objects>
((stack end))

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

((stack| <objects> | float=left/right | clear=true/false))

or

((stack begin | float=left/right | clear=true/false))

where

  • 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/right | clear=true/false
|1=<object(s)>
|2=<object(s)>
|3=<object(s)>, etc. up to 9 parameters in the current version
))
  • NB This multiple argument version does include extra vertical whitespace between each (set of) <object(s)>.
To illustrate the utility of the stack templates, consider the following situation. We would like to have two right floating images at the top of the first section of our article (here, the Lipsum section), and one left floating image at the top of the second section (here, the Lorem section). To achieve this layout, without using a stack template, we could try the following code:
=====''Lipsum''=====
[[File:Simple shapes example.png|thumb|right|Example 1a]]
[[File:Simple shapes example.png|thumb|right|Example 1b]]
... text ...

=====''Lorem''=====
[[File:Simple shapes example.png|thumb|left|Example 1c]]
... text ...

=====''Ipsum''=====
... text ...
The result of this is shown in the without stack section below. Notice how the left floating image (Example 1c) is prevented from floating above the last right floating image (Example 1b). You may need to resize the width of your browser to fully appreciate the issue. To fix this problem, we can stack the two right floating images together, using the following code:

=====''Lipsum''===== ((stack |[[File:Simple shapes example.png|thumb|right|Example 2a]] [[File:Simple shapes example.png|thumb|right|Example 2b]])) ... text ...

=====''Lorem''===== [[File:Simple shapes example.png|thumb|left|Example 2c]] ... text ...

=====''Ipsum''===== ... text ...

The result of this is show in the with stack section below. Notice how by adding this stack template, the left floating image (Example 2c) can now float higher and is not blocked from floating higher than the top of the last right floating image (Example 2b).

====Without

((stack))====

Example 1b
Example 2b

ފަންވަތް:Lipsum

Example 3b

ފަންވަތް:Lipsum

ފަންވަތް:Lipsum

ފަންވަތް:Lipsum

====With

((stack))====


ފަންވަތް:Lipsum

Example 3a

ފަންވަތް:Lipsum

ފަންވަތް:Lipsum

ފަންވަތް:Lipsum

====With
((stack begin)) and

((stack end))====

Lipsum with second table wider
[އުނިއިތުރު ގެންނަވާ]

ފަންވަތް:Stack begin

Sample table 1
Example 1a
Example 1b
Sample wider table 2
Example 2a
Example 2b

ފަންވަތް:Stack end ފަންވަތް:Lipsum

Sample table 3
Example 3a

ފަންވަތް:Lipsum

ފަންވަތް:Lipsum

ފަންވަތް:Lipsum

Lipsum with first table wider
[އުނިއިތުރު ގެންނަވާ]

ފަންވަތް:Stack begin

Sample wider table 1
Example 1a
Example 1b
Sample table 2
Example 2a
Example 2b

ފަންވަތް:Stack end ފަންވަތް:Lipsum

Sample table 3
Example 3a

ފަންވަތް:Lipsum

ފަންވަތް:Lipsum

ފަންވަތް:Lipsum

((Stack)) can also be used to float one or more images across a page.

((stack|[[File:Simple shapes example.png|80px]]))
((stack|[[File:Simple shapes example.png|120px]]))
It might take some experience to learn how the box area floats, in combination with various images or wikitables on a page.

((Stack))'s operation is very quick, as it uses an HTML <table> to achieve its effects.

((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.

Infobox


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))

((Stack begin))

((Stack end))

((Double image)), which places images side by side horizontally.

((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.

{{bottomLinkPreText}} {{bottomLinkText}}
ފަންވަތް:Stack
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?