Difference between revisions of "Template:SpeciesStatBar"

From Cassette Beasts
m (Changed the max value to 300 so it won't clip outside the margins anymore.)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<div style="padding: 1em">
+
<div style="padding: 0.5em">
<div style="background: #000; width: 400px; height: 30px"><div style="text-align: center; color: #fff; font-weight: bold; top: 0; position: relative; width: 100%; height: 100%; vertical-align: middle; float: left; font-size: 20px">{{{value|0}}}</div><div style="background: #3fbb9f; width: {{#expr: ({{{value|50}}}*400/{{{max_value|200}}})}}px; height: 100%"></div></div>
+
<div style="background: #000; width: 100%; max-width: 400px; height: 30px"><div style="text-align: center; color: #fff; font-weight: bold; top: 0; position: relative; width: 100%; height: 100%; vertical-align: middle; float: left; font-size: 20px">{{{value|0}}}</div><div style="background: #3fbb9f; width: {{#expr: ({{{value|50}}}*100/{{{max_value|300}}})}}%; height: 100%"></div></div>
 
</div>
 
</div>

Latest revision as of 21:24, 10 May 2023

0