Mal:Flyt bilde/dok

Fra Wikikilden

Usage[rediger]

Creates floating image and caption.

{{Img float
 | file     = 
 | width    = 
 | align    = 
 | cap      = 
 | capalign = 
 | alt      = 
}}

Parameters[rediger]

  • {{{file}}}: The file name (without the "File:" prefix) (mandatory parameter)
  • {{{width}}}: The width of the image (optional, default 150px)
  • {{{align}}}: The alignment of the image on the page ("left", "right" or "center"; default "right").
  • {{{cap}}}: The image caption (optional)
  • {{{capalign}}}: The image caption text alignment ("left", "right" or "center"; default "center")
  • {{{alt}}}: Image alt-text, ie. for mouse-over text box or for use with a screenreader for the visually impaired (optional)

Example[rediger]

Image on right[rediger]

{{Img float
 | file     = The Kinematics of Machinery Fig 2.jpg
 | width    = 250px
 | align    = right
 | cap      = Fig. 2.
}}


Fig. 2.
Mal:Lorem ipsum

Image on left[rediger]

{{Img float
 | file     = The Kinematics of Machinery Fig 2.jpg
 | width    = 250px
 | align    = right
 | cap      = Fig. 2.
}}


Fig. 2.
Mal:Lorem ipsum

Left aligned image caption[rediger]

{{Img float
 | file     = The Kinematics of Machinery Fig 2.jpg
 | width    = 250px
 | align    = right
 | cap      = Fig. 2.
 | capalign = left
}}


Fig. 2. On the left.
Mal:Lorem ipsum

Image in centre[rediger]

Don't use a template for this, just insert the image followed by the caption like this:

{{lorem ipsum}}
[[File:The Kinematics of Machinery Fig 1.png|center|150px]]
{{c|Fig.2}}

{{lorem ipsum}}

Mal:Lorem ipsum

Fig.2

Mal:Lorem ipsum