User:Jareel_Skaj/TDp
< User:U12017485
Revision as of 10:36, 26 July 2024 by Jareel_Skaj (talk | contribs) (Created a template for better illustration of a scale differences)
This template allows you to create progress bars within table cells.
Note
- row needs to have height set to 100% for this to work (
|- style="height: 100%;"
) - this template already contains
|
(table row command), so it should be used directly in line
Code | Sample |
---|---|
{{User:U12017485/TDp|value=50|2 Lorem ipsum dolor sit amet}}
|
2 Lorem ipsum dolor sit amet |
{{User:U12017485/TDp|color=#94a4b0|value=45|1 Lorem ipsum dolor sit amet}}
|
1 Lorem ipsum dolor sit amet |
{{User:U12017485/TDp|color=#94a4b0|valueP=0.40|4 Lorem ipsum dolor sit amet}}
|
4 Lorem ipsum dolor sit amet |
{{User:U12017485/TDp|color=rgb(176, 190, 197)|valueP=0.35|padding=0|3 Lorem ipsum dolor sit amet}} (this sample shows a new parameter: padding, and a color matching the table borders)
|
3 Lorem ipsum dolor sit amet |
Wiki's sorting still works fine, ignoring the html, and going straight for the content :)
Code sample for a whole table:
{| class="wikitable sortable" style="text-align:center" width="100%" |- ! Test ! Sample |- style="height: 100%;" | test {{User:U12017485/TDp|value=50|Lorem ipsum dolor sit amet}} <!-- this line correctly does '''not''' start with <code>| </code>! --> |}