Tomas Klinkovsky wrote:
>
> I have following XML fragment:
>
> <table>
> <row>...</row>
> <row>...</row>
> ...
> </table>
>
> and I would like to display it (speaking about CSS for visual editing)
> as a table with table header, preceded by section title. The HTML
> formatting equivalent would be this:
>
> <h2>SECTION TITLE</h2>
> <table>
> <thead>TABLE HEADER</thead>
> <tbody>...</tbody>
> </table>
>
> I know how to generate either table header or section title from CSS.
> But is it possible to generate both at once?
* You know that:
table:before {
display: block;
content: "SECTION TITLE";
font-weight: bold;
font-size: large;
}
would give you something looking like:
<h2>SECTION TITLE</h2>
* You also know that:
table:before {
display: table-row;
content: row(cell("TABLE HEADER"));
font-weight: bold;
}
would give you something looking like:
<thead><tr><th>TABLE HEADER</th></tr></thead>
* But, unfortunately, as you have guessed it, you cannot have both.