Log in

View Full Version : What have I done wrong?


Hex_legend
12-31-2007, 07:00 AM
I am trying to get something on the same line, one command on the left and the other on the right.

This is the code I am using:



<tr>
<td height="25" colspan="2" class="sub"> <table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
We have a total of 0 users, 0 of which are online.<if condition="$show['member']"><div align=right><font color="white"><b>Logged In As:</b></font><font color="yellow"> $bbuserinfo[username]</font>
</if>
</div>

</tr>
</table></td>





See screenshot for how it looks now

Fraik
12-31-2007, 07:18 AM
Try this:


<tr>
<td height="25" colspan="2" class="sub">

<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">

<tr>
<td>
<div style="float: left;">
We have a total of 0 users, 0 of which are online.
</div>
<if condition="$show['member']">
<div style="float: right;">
<font color="white"><b>Logged In As:</b></font>
<font color="yellow"> $bbuserinfo[username]</font>
</div>
</if>
</td>
</tr>

</table>

</td>
</tr>

SEOvB
12-31-2007, 07:18 AM
Thats some awfully ugly code, but try changing the div to a span and closing it...

Hex_legend
12-31-2007, 07:23 AM
Thanks

Worked a treat.

How would you clear the code to make it look a bit tidier?

Fraik
12-31-2007, 07:28 AM
Using tabs usually helps. Tabs don't work in the vB editor windows though, so you'd have to do that in whatever HTML editor you use (if you don't have one, try metapad or similar software)

Freesteyelz
12-31-2007, 08:04 AM
Rather than using <font> use (as an example):


<span style="color:#ffffff;font-weight:bold">Logged In As:</span>
<span style="color:yellow">$bbuserinfo[username]</span>