Forum Moderators: not2easy

Message Too Old, No Replies

<caption> and spacing

IE quirk?

         

bigbobby73

4:44 pm on Jun 18, 2004 (gmt 0)

10+ Year Member



Hi all,

I just put together a nice table of tabular data and realized that IE does not respect the padding or margin on the <caption> tag. Making the caption flushed against the header rows.

Can I use padding or margin with the caption tag on a table?

Both Opera and Mozilla rendered the code correctly, but IE didn't so I wasn't sure. Is this an IE quirk and does anyone know of a workaround?

Actual code:

.classname caption {width: 560px;margin: 5px auto 10px auto;text-align:left;}

DrDoc

4:45 pm on Jun 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you using a full and valid doctype?

bigbobby73

4:48 pm on Jun 18, 2004 (gmt 0)

10+ Year Member



Yah, both the CSS and HTML validate under 4.01 Transitional

Purple Martin

12:37 am on Jun 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



margin doesn't work, but padding does. Maybe this is because caption is actually an inline element - I know it looks blocky because it's on it's own line, but that's only because the next element is a row which is a block element.

bigbobby73

12:37 am on Jun 22, 2004 (gmt 0)

10+ Year Member



Thanks Purple Martin. Yhe margin was respected in standard complaint browsers so I thought it was an IE quirk. Setting the padding worked perfect.

Thanks