# Floating a image with a caption under it

**URL:** <https://forum.kirupa.com/t/floating-a-image-with-a-caption-under-it/161955>\
**Category:** web dev\
**Created:** [September 8, 2005, 2:48pm UTC](https://forum.kirupa.com/t/floating-a-image-with-a-caption-under-it/161955 "2005-09-08T14:48:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DDD](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@DDD](https://forum.kirupa.com/u/DDD)\
**Post date:** [September 8, 2005, 2:48pm UTC](https://forum.kirupa.com/t/floating-a-image-with-a-caption-under-it/161955/1 "2005-09-08T14:48:27Z")

</div>

I have a basic paragraph with a image floated in it so the text wraps around the image. Like so

```php
<p><img src="image.jpg" width="184" height="138" class="leftImage" /> some text</p>

```

Here is the css:

```php
.leftImage{
	float: left;
	padding-right: 10px;
	padding-bottom: 10px;
	clear: both;
}

```

Now I want to add a caption under just the picture using the \<em\> tag. So that it will basically become part of the float and not flow with body text. I dont want to make the caption text part of the image…any ideas?
