Log in

View Full Version : code help


billb
04-16-2009, 04:32 AM
I am looking for a way to create a space between 3 images in postbit_legacy file:

This is the code:
<table border="0" cellspacing="0" cellpadding="0" style="width: 61%" align="center">
<if condition="$post[field5]"><tr>
<td align="center"><img border="0" src="images/gender/$post[field5].gif" /></td>
</tr></if>
</tr>

<if condition="$post[field6]"><tr>
<td align="right"><img border="0" src="images/flags/$post[field6].gif" /></td>
</tr></if>
</tr>
</table>

<if condition="$post[userid]">
<span class="smallfont">
<center>

<!-- ONLINE -->
$post[onlinestatus]
<!-- ONLINE -->
</center>
</span>
<br>

Please see attached image: gender, flag and status as they appear without any spacing.
Can the above code be modified to separate these icons further; a part from each other ?
your help is much appreciated.

MickDoneDee
04-16-2009, 04:47 AM
In your table attributes give cellspacing="0" a value >0 and see what happens.

TigerC10
04-16-2009, 04:56 AM
This is probably the easiest way to do it:


<table border="0" cellspacing="0" cellpadding="0" style="width: 61%" align="center">
<if condition="$post[field5]"><tr>
<td align="center"><img border="0" src="images/gender/$post[field5].gif" /><br /></td>
</tr></if>
</tr>

<if condition="$post[field6]"><tr>
<td align="right"><img border="0" src="images/flags/$post[field6].gif" /><br /></td>
</tr></if>
</tr>
</table>

<if condition="$post[userid]">
<span class="smallfont">
<center>

<!-- ONLINE -->
$post[onlinestatus]
<!-- ONLINE -->
</center>
</span>
<br>


^Code changes in red.

billb
04-16-2009, 11:14 AM
Solved; see attached image

and indeed Many thanks to you guys :up:
I replaced the code with TigerC10's code;
then gave cellspacing a value =6 per MickDoneDee's

regards