Template:Progress bar: Difference between revisions
Jump to navigation
Jump to search
add color parameters |
also add a border color parameter |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<div style="height: 18px; width: {{{width|100%}}}; background: {{{background|#fff}}}; border: 1px solid silver; margin: auto; padding: 0;"> | <div style="height: 18px; width: {{{width|100%}}}; background: {{{background|#fff}}}; border: 1px solid {{{border|silver}}}; margin: auto; padding: 0;"> | ||
{{#if:{{{from|}}}|<div style="float:left;">{{{from}}}</div>}}{{#if:{{{to|}}}|<div style="float:right;">{{{to}}}</div>}} | {{#if:{{{from|}}}|<div style="float:left;">{{{from}}}</div>}}{{#if:{{{to|}}}|<div style="float:right;">{{{to}}}</div>}} | ||
<div style="height: 14px; margin: 2px; padding: 0; background: {{{color|#C9DDEC}}}; width:{{{progress|0%}}};"> | <div style="height: 14px; margin: 2px; padding: 0; background: {{{color|#C9DDEC}}}; width:{{{progress|0%}}};"> | ||
| Line 8: | Line 8: | ||
<pre> | <pre> | ||
{{Progress bar | {{Progress bar | ||
|width = | |width = optional, defaults to 100%. Use percentage or pixels, as desired. | ||
|from = | |from = optional, text to put at the left edge of the bar | ||
|to = | |to = optional, text to put at the right edge of the bar | ||
|color= | |color= optional, sets the color of the progress bar (defaults to a light blue) | ||
|background = optional, sets the color of the background behind the bar | |background = optional, sets the color of the background behind the bar (defaults to white) | ||
|progress = | |border = optional, sets the color of the border (defaults to silver) | ||
|progress = optional, defaults to 0%. Use a percentage to ensure maximum flexibility. | |||
}} | }} | ||
</pre> | </pre> | ||
Latest revision as of 01:50, 4 January 2008
{{#if:|
{{{from}}}
}}{{#if:|{{{to}}}
}}
A simple progress bar.
{{Progress bar
|width = optional, defaults to 100%. Use percentage or pixels, as desired.
|from = optional, text to put at the left edge of the bar
|to = optional, text to put at the right edge of the bar
|color= optional, sets the color of the progress bar (defaults to a light blue)
|background = optional, sets the color of the background behind the bar (defaults to white)
|border = optional, sets the color of the border (defaults to silver)
|progress = optional, defaults to 0%. Use a percentage to ensure maximum flexibility.
}}
Obviously, one will want to put some sort of percentage figure into the progress parameter.