XML technologies / DocBook / Generating (X)HTML / Formatting headings / Customizing with CSS
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
The easiest way to change headings is to inspect the HTML output structure and then write a CSS rule for it. With small adjustments, the following procedure also applies to other headings. To change the font size of chapter headings, proceed as follows:
Create a customization file as shown in Creating a customization file for (X)HTML. In your customization file, set the parameter
html.stylesheetto your CSS file (see Adding a reference to a CSS file).Inspect the structure of your HTML file (see Structure of a generated (X)HTML file). Chapter headings have the following structure:
<DIV class="chapter"" ...>
<DIV class="titlepage">
<DIV>
<DIV>
<H2 class="title">...Add the following rule to your CSS file:
div.chapter h2.title
{
font-size:xx-large;
}
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