Page 1 of 1

avatars

Posted: Mon Mar 03, 2014 4:00 am
by unvash
how can i show the avatars in one big image ? i use this code but its not show all the avatar in big image its just showing the avatars in a simple drop down list

<div style="width: 100px; height: 175px; overflow: auto; border: solid 2px">
<?php
for ($i=0; $i<$avatarmax; $i++)
{
$a = "display: inline-block; width: 48px; height: 48px; background: " .
"url('" . $avatarurl . "') no-repeat -" . ($i * 48) . "px 0px;";
$s = "<input type='radio' name='Avatar' value='" . ($i + 1) . "'";
if ($i == 0) $s .= " checked";
$s .= ">";
$s .= "<div style=\"" . $a . "\"></div>";
echo $s . "<br><br>\r\n";
}
?>

Re: avatars

Posted: Mon Mar 03, 2014 10:24 am
by Kent Briggs
unvash wrote:how can i show the avatars in one big image ?
Just display the $avararurl as-is, without the no-repeat and offset parameters.

<img src="http://www.example.com:8087/Image?Name=Avatars">