cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

vertically align table cell content to baseline not total height?

naglists
1-Newbie

vertically align table cell content to baseline not total height?

Hi,

I am trying to vertically align CALS table cell content but am finding that
alignment appears to consider the total height of a word including both
ascenders and descenders. Only one cell contains a descender and the text
looks as though it is floating up a tad relative to the other cells'
content.

Any tips?

--
Paul Nagai
4 REPLIES 4

Hi Paul-



I ran into this a while back. IIRC, the kluge was to insert a very thin
(short) block, something like 0.1em, inside every table cell after the
text content, which would basically neutralize the effect of the
descenders on line height calculations. We were using XSL-FO, so we
added that block during the transformation. I'm not sure how that would
translate into FOSI if you're going that route-maybe some kind of
usetext voodoo on your entry element e-i-c?



--Clay


Always glad to find I'm not alone. Thanks, Clay. I am using FOSI and,
fortunately for me, I happen to have a pseudo element in use on this content
already so I ought to be able to add a usetext with something 0.1em tall.

On Wed, Feb 27, 2008 at 4:35 PM, Clay Helberg <clay.helberg@mathworks.com>
wrote:

> Hi Paul—
>
>
>
> I ran into this a while back. IIRC, the kluge was to insert a very thin
> (short) block, something like 0.1em, inside every table cell after the
> text content, which would basically neutralize the effect of the descenders
> on line height calculations. We were using XSL-FO, so we added that block
> during the transformation. I'm not sure how that would translate into FOSI
> if you're going that route—maybe some kind of usetext voodoo on your entry
> element e-i-c?
>
>
>
> --Clay
>
>

Paul,

There is a help topic titled "Placement of top line within table cells"
that may be of interest.

I've always found the relationship between the cell margins and the font
size/leading tricky because the -5pt in the calculation is fixed and
doesn't work for larger font sizes. Adjusting the cell margins is
sometimes required.

Hope this may help.

David


David S. Taylor


Project Manager, Structured Information
Institute for Research in Construction
National Research Council Canada
Bldg. M-23A, Room 239
1200 Montreal Road, Ottawa, ON K1A 0R6

Set tableminimumrowheight might also work.


Announcements