Hi fantasia, thanks for your suggestion.

Margin is ignored for captions.
But a white border-left seems to do the trick:

  table {
  /* NB */
  /* IE tables don't inherit font-size */
    font-size: 1em;
    border: thin solid black;
  }

  th, td {
    padding: 0.25em;
  }

  table caption {
    caption-side: top;
  /* NB *
  /* padding needs extra allowance for border */
    border-left: thin solid white;
    padding: 0.25em;
  }

Cheers
Trevor

-----Original Message-----
From: fantasai [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 9 August 2007 8:26 a.m.
To: [EMAIL PROTECTED]
Cc: css-d@lists.css-discuss.org
Subject: Re: [css-d] mixed units for table padding

Trevor Nicholls wrote:
> I hope this requirement is simple!
> 
> I am trying to align a table caption with a table cell.
> The table has a 2 pixel border.
> The table cell has 0.25em padding.
> This means that the table caption needs padding of 0.25em + 2px.
> The browser is IE.
> 
> Is this possible without making assumptions about font sizes?

Does your caption have a border or backgrounds? Because if not,
   margin: 2px;
   padding: 0.25em;
might work

~fantasai

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to