Hi, I'm not a programmer but just need a small tip about this. I have a code snippet that runs as follows: echo "<div>"; echo "<h3 align=left>".sprintf($in_chat)."</h3>"; echo "</div>"; Code (markup): I wish to add the following to that output line, only aligned right. <a href="http://www.someplace.co.nz" title="cPanel Hosting"><img src="/graphic.png" width="100" height="30 border="0"></a> Code (markup): Is anyone here able to help me with this?
Instead of using: echo "<h3 [COLOR="red"]align=left[/COLOR]>".sprintf($in_chat)."</h3>"; Code (markup): Try using: echo "<h3 [COLOR="red"]style='text-align:right'[/COLOR]>".sprintf($in_chat)."</h3>"; Code (markup):
Sorry, didn't make it clear. I want $in_chat aligned left and the href stuff aligned right in the same line.
You can use following codes: echo "<h3><span[COLOR="red"] style='float:left'[/COLOR]>".sprintf($in_chat)."</span><a [COLOR="red"]style='float:right'[/COLOR] href='http://www.someplace.co.nz' title='cPanel Hosting'><img src='/graphic.png' width='100' height='30' border='0'></a></h3>"; Code (markup):
Hi dthoai Thanks for that very useful suggestion. With your help I have managed to get it sorted, with the following code. echo "<div>"; echo "<h3 align=left>".sprintf($in_chat). "<span style='float:right'> Hosted by "." <a href='http://www.flexihost.co.nz' title='NZ Hosting from $4.95/month'> <img src='../../../../../images/ads/flexihost.png' width='100' height='15' border='0'> </span></h3>"; echo "</div>"; Code (markup): I appreciate your help