Partyism wrote:Cant this by default be 1 pixel wide?
should this work:
- Code: Select all
<img height="10" src="http://www.partyism.nl/images/poll/poll_stats.jpg" width="><?=($in_percent == 0 ? '1px' : $in_percent)?>" />
and if you want to put the percentage in text you can use the background and CSS it'll look like this:
- Code: Select all
<div style="background:url(http://www.partyism.nl/images/poll/poll_stats.jpg); height:10px; width:<?=($in_percent == 0 ? '1px' : $in_percent)?>"><div style="position:static; margin-left:20px;"><?=$in_percent;?></div></div>
if the poll in the right side change left to right

