Hi all,
Can someone tell me,
How to wrap text around an image when the image source is in a php variable?Here is my code.

<style type="text/css">
#divider {
 background-color: #ccffff;
 border: 1px solid #ccc;
 padding: 0px;
 margin: 1px 0px 0px 0px;


position: absolute;
border: 2px solid #ccc;
 margin: 1px 0px 0px 0px;
top: 111px;
left: 220px;

 {   // I tried using float,align,valign but nothing worked.
    float: left; 



//database connections

echo '
<table width = "560"  class="fndslist" BGCOLOR="white" border="0" cellpadding="4" cellspacing="4">';
mysql_select_db ('db1');

$result = mysql_query("SELECT * FROM table1")or die(mysql_error());  

while($row = mysql_fetch_array( $result )) 
echo '<tr id="divider"><td>'.$row['profileimg'].$row['username'].'</td></tr>';


echo '</table>';

I have tried using valign,float,align but nothing is helping the text to wrap around the image. The text is simply getting displayed from the bottom-right corner of the image.
Can somebody help me resolve this issue.

Thanks in advance,

8 Years
Discussion Span
Last Post by Kavitha Butchi

If alignment of the image wont work, why not make a barrier around the image. An example is

$imgwidth=64; //Image width
$imgheight=64; //Image height
echo '<tr id="divider"><td>
<table border=0 cellpadding=0 cellspacing=0 width=$imgwidth 
height=$imgheight align=left>

The above is just from the top of my head so don't be too suprised if there is a bug or 2.

Votes + Comments

You are such a Genius it just worked very fine.

Thanks a Ton for it!!! Thankyou for your time :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.