Template:CompositionBar: Difference between revisions

Jump to navigation Jump to search
sayerleft (talk | contribs)
Created page with "<noinclude> This template creates a single horizontal bar that visually represents a percentage or value relative to a total, similar to how the Wikipedia `Template:Composition_bar` can be used for a single metric. ```wiki {{#tag:syntaxhighlight| <div class="composition-bar-wrapper" style=" {{#if:{{{width|}}}|width:{{{width}}};|width:100px;}} {{#if:{{{float|}}}|float:{{{float}}};}} margin-left:auto; margin-right:0; →Default align right: border:{{{5|{{{border..."
 
sayerleft (talk | contribs)
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
This template creates a single horizontal bar that visually represents a percentage or value relative to a total, similar to how the Wikipedia `Template:Composition_bar` can be used for a single metric.
This template creates a single horizontal bar that visually represents a percentage or value relative to a total, similar to how the Wikipedia `Template:Composition_bar` can be used for a single metric.
== Usage ==
To use this template, copy the following code to a page named `Template:CompositionBar` (or a similar name of your choice):


```wiki
```wiki
Line 23: Line 26:
   </div>
   </div>
</div>
</div>


Example:
Example: