I am new to all this and i trying to make this.
$hpperc = min((int) ($ir['hp'] / $ir['maxhp'] * 100), 100);
$hpopp = 100 - $hpperc;
<b>Health:</b> {$hpperc}%<br />
<img src='greenbar.png' width='$hpperc' height='10' /><img src='redbar.png' width='$hpopp' height='10' />
To work with this.
<div class="stats">
Health100%
<div style="padding-left: 19px;">
<div style="background: url(images/bg-bar.png) no-repeat;width:62px;height:26px;">
<div style="background: url(images/red-bar.png) no-repeat;width:62px;height:26px;">
<div style="color: #e4dfca;position: absolute;padding-top: 6px;padding-left:18px;">100%</div>
</div></div></div>
</div>
If anyone can help that would be much appreciated.