# Wrap Text Around Images

**URL:** <https://forum.kirupa.com/t/wrap-text-around-images/26825>\
**Category:** programming\
**Created:** [July 26, 2003, 10:36pm UTC](https://forum.kirupa.com/t/wrap-text-around-images/26825 "2003-07-26T22:36:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdrawkcaB](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@sdrawkcaB](https://forum.kirupa.com/u/sdrawkcaB)\
**Post date:** [July 26, 2003, 10:36pm UTC](https://forum.kirupa.com/t/wrap-text-around-images/26825/1 "2003-07-26T22:36:56Z")

</div>

I have an image in a table, at the top left corner and want the text to wrap around it, but I cant. I make everything the allignment it says I should on pages, but it wont work… It always starts at the bottom of the pic… ☹ Any help?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 27, 2003, 12:00am UTC](https://forum.kirupa.com/t/wrap-text-around-images/26825/2 "2003-07-27T00:00:03Z")

</div>

If you just want it right next to it you could create another cell right by it

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 27, 2003, 12:16am UTC](https://forum.kirupa.com/t/wrap-text-around-images/26825/3 "2003-07-27T00:16:00Z")

</div>

Or, you could create cell, set the picture ad a background in the cell, and type over it. I’m sure there is another way, but i am not sure of it now.

Hope this helps!  
:tb:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 27, 2003, 7:51am UTC](https://forum.kirupa.com/t/wrap-text-around-images/26825/4 "2003-07-27T07:51:47Z")

</div>

Whoa, another cell in there? Exactly what does that mean another cell? Add another cell into the table?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 27, 2003, 1:25pm UTC](https://forum.kirupa.com/t/wrap-text-around-images/26825/5 "2003-07-27T13:25:16Z")

</div>

yup

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 27, 2003, 1:54pm UTC](https://forum.kirupa.com/t/wrap-text-around-images/26825/6 "2003-07-27T13:54:18Z")

</div>

Place the image before the text and make sure to set the align attribute for the image to “left”. The text will then wrap around the image on the right and below.

For example:

```php

<table width="760">
  <tr>
    <td>
      <img src="myphoto.jpg" width="200" height="150" align="left">
        text text text......
    </td>
  </tr>
</table>

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 28, 2003, 4:14pm UTC](https://forum.kirupa.com/t/wrap-text-around-images/26825/7 "2003-07-28T16:14:15Z")

</div>

Yea, that doesn’t work either, I put the image in the table and allign it to the top left corner, and the text is STILL on the bottom.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 28, 2003, 4:26pm UTC](https://forum.kirupa.com/t/wrap-text-around-images/26825/8 "2003-07-28T16:26:10Z")

</div>

Can you post the pertinent portion of your code? I’ve tested my example and it works fine.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 29, 2003, 9:03pm UTC](https://forum.kirupa.com/t/wrap-text-around-images/26825/9 "2003-07-29T21:03:38Z")

</div>

```php

<table width="144" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#666666">
                    <tr> 
                      <td height="111" align="center" valign="top" bgcolor="#CCCCCC"><div align="left"><img src="../../Buy%20 **** /Images/header.jpg" width="55" height="55">sfsfsfsfsfsfssfsfsfsfs 
                          sfsfsfsfsfsfsfsf ssf</div></td>

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 29, 2003, 10:54pm UTC](https://forum.kirupa.com/t/wrap-text-around-images/26825/10 "2003-07-29T22:54:35Z")

</div>

I see the problem. You’re using a DIV tag to align the image to the left of the cell. The align=“left” attribute needs to be INSIDE the IMG tag in order for the text content to wrap properly.

```php

<table width="144" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#666666">
  <tr> 
    <td height="111" bgcolor="#CCCCCC" valign="top"><img src="../../Buy%20 **** /Images/header.jpg" width="55" height="55" align="left">text 
      text text text text text text text text text text text text text text text 
      text text text text text text </td>
  </tr>
</table>

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 30, 2003, 1:28pm UTC](https://forum.kirupa.com/t/wrap-text-around-images/26825/11 "2003-07-30T13:28:49Z")

</div>

Thanks!
