PDA

View Full Version : Trying to center avatar, why doesnt this code work.



aceofspades
Sun 7th Oct '07, 12:00pm
My avatar is just left of center in the postbit legacy, and i cant work out why because before i started it was in the center. Here is my code:



<if condition="$show['avatar']">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</if>


How do i center the code above, the only code i know to center is <center></center> but im wondering if that is the right way of doing it, and also shouldnt it be center by default?

James

Jose Amaral Rego
Sun 7th Oct '07, 7:58pm
# find in 3.6.x template: postbit_legacy
# replace with this code


<if condition="$show['avatar']">
<div class="smallfont" style="text-align: center; margin-bottom: 0px;">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>

aceofspades
Mon 8th Oct '07, 7:22pm
Thanks, worked perfectly :)