XML technologies / DocBook / Block elements / Tables / Aligning columns
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
Column alignment is controlled by the attributes align and valign:
- Horizontal (
align) This attribute accepts the values
center(centred),left(left-aligned),right(right-aligned) andjustify(justified). The valuecharhas a special role: it aligns a column on a character. A typical use is aligning decimal numbers on a point or comma.The attribute
alignis available in the following elements:colspec,entry,spanspecandtgroup.- Vertical (
valign) This attribute accepts the values
top(top),middle(middle) orbottom(bottom).
The attributevalignis available in the following elements:entry,row,tbody,tfootandthead.
The following example shows a table using the attribute values described above:
<table>
<title>...</title>
<tgroup cols="2">
<tbody valign="middle">
<row valign="top">
<entry align="right">...</entry>
<entry align="center">...</entry>
</row>
</tbody>
</tgroup>
</table>
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de
back to top