Forum How do I...?

Using caption-side with "float:outside"

somnath
Hi folks,

I have a structure as follows:
<div class="image">
<img src="image" alt=""/>
<p>This is a caption</p>
</div>

In my print css, I display <div> as table. <p> as table-caption with property "caption-side: top". This works fine. But when I use the property "float: outside" for <p>, it loses its caption-side property.
[I want the caption to be floated in the margin and the image to occupy the galley area.]

Can anyone help me on this?

Thanks in advance.


Somnath
mikeday
Tricky! We'll take a look at this. :)
mikeday
Okay, according to section 9.7 of CSS 2.1, the display property computes to "block" for table captions that have been floated, so they are no longer table captions any more.

A workaround for this would be to include another block element inside the table caption element, and float that instead.