Badge time.png   The Paragon Wiki Archive documents the state of City of Heroes/Villains as it existed on December 1, 2012.

Difference between revisions of "Template:CenterAlignIcon/doc"

From Paragon Wiki Archive
Jump to: navigation, search
 
Line 27: Line 27:
 
| {{CenterAlignIcon|width=24|text=16.5%|image=File:TO Training Fear Duration.png|hover=Fear Duration}}
 
| {{CenterAlignIcon|width=24|text=16.5%|image=File:TO Training Fear Duration.png|hover=Fear Duration}}
 
|}
 
|}
 +
 +
==Caveat==
 +
 +
This is '''only''' intended to be used as illustrated above. If you use it in other contexts, you will likely get overlapping text/icons. For example, this usage:
 +
 +
<pre>{{CenterAlignIcon|width=24|text=33%|image=File:TO Training Endurance Cost.png|hover=Endurance Cost}}{{CenterAlignIcon|width=24|text=16.5%|image=File:TO Training Fear Duration.png|hover=Fear Duration}}</pre>
 +
 +
Results in this:
 +
 +
{{CenterAlignIcon|width=24|text=33%|image=File:TO Training Endurance Cost.png|hover=Endurance Cost}}{{CenterAlignIcon|width=24|text=16.5%|image=File:TO Training Fear Duration.png|hover=Fear Duration}}
  
 
<includeonly><!--
 
<includeonly><!--
 
++++ PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. -->
 
++++ PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. -->
 
</includeonly>
 
</includeonly>

Latest revision as of 04:10, 15 November 2010

This is a documentation subpage for Template:CenterAlignIcon (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

Usage

This template will allow a column of icons to be aligned such that their icons are all in a vertical column, irrespective of whatever text is to their right. In order for them to center align, they must be in a context that is centered.

Permissible option:

width=
The width of the image to use, in pixels. Required.
text=
The text to show at the right. Required.
image=
The image to show. Required.
hover=
The text do display if the mouse is hovered over the image. Default is {{{image}}}.

Examples

Template Call Result
{{CenterAlignIcon|width=24|text=33%|image=File:TO Training Endurance Cost.png|hover=Endurance Cost}} 33%Endurance Cost
{{CenterAlignIcon|width=24|text=16.5%|image=File:TO Training Fear Duration.png|hover=Fear Duration}} 16.5%Fear Duration

Caveat

This is only intended to be used as illustrated above. If you use it in other contexts, you will likely get overlapping text/icons. For example, this usage:

{{CenterAlignIcon|width=24|text=33%|image=File:TO Training Endurance Cost.png|hover=Endurance Cost}}{{CenterAlignIcon|width=24|text=16.5%|image=File:TO Training Fear Duration.png|hover=Fear Duration}}

Results in this:

33%Endurance Cost16.5%Fear Duration