Fw: [docbook-css] Minor Table problem
David Holroyd
dave at badgers-in-foil.co.uk
Thu, 21 Oct 2004 12:24:37 +0000
On Thu, Oct 21, 2004 at 12:35:27PM +0100, martin.gautier@myrnham.co.uk wrote:
> The problem is for XML viewed with CSS only. The troublesome images _are_
> larger than the column width I've set - I've not tried smaller images but
> David's earlier work implies that they work OK?
>
> Adding the valign="top" to the imagedata makes no difference to the CSS
> output unfortunately.
The CSS currently makes no use of any attributes on table-related
elements, though it's probably possible to make use of 'valign', at
least. You could try the following (I've no time to test):
entry[valign=top] {
vertical-align: top;
}
entry[valign=bottom] {
vertical-align: bottom;
}
I didn't really spend any effort on doing tables 'right', I just tried
to give the correct values for the display: property, so that the
content wouldn't all just appear inline.
> My impression is that the problem is related to CSS and the Browser
> technology rather than the XML itself...
My hunch is that; in the absence of any other instructions on how to
vertically align things, it's trying to align cell content to some
row-wide 'baseline'. That being the case, adding a newline before the
image will mean that this cell contains two line-boxes, and probably
other elements in the row are then vertically aligned to the baseline of
the (empty) line-box above the image.
Does any of that help?
dave