← Prev in month
← Prev in thread
Make better use of IDs in the HTML stylesheets?
Hi there
When generating HTML from DocBook XML, structures (such as tables or
appendices) with ids generate HTML like this:
<div class="appendix" lang="en">
<h2 class="title" style="clear: both"><a name="appendix_a"
id="appendix_a"></a>A. Databases to be backed up</h2>
<div class="glosslist">
That's from XML like this:
<appendix id="appendix_a">
<title>Databases to be backed up</title>
<para><glosslist>
Now I want to write CSS to style this appendix. The problem is that I
can't write a selector for an *ancestor* of the A element with the id.
To target the structure I have to insert e.g. a dummy paragraph
*before* the structure and style it with 'display: none'. Then I can
write CSS like 'p#dummy + div'. Eugh.
Consider putting the id in a place that actually identifies the entire
named section?
--
jean . .. .... //\\\oo///\\
← Prev in month
← Prev in thread