Hello,
I have a document where the h1 titles contain spans to apply different css formating to the text inside them. These titles are used as header on top of each page.
I couldn't find a way to apply the span css format when used as page header.
Any idea ?
There are some examples of things that I already tried below.
Regards,
Nicolas
I have a document where the h1 titles contain spans to apply different css formating to the text inside them. These titles are used as header on top of each page.
I couldn't find a way to apply the span css format when used as page header.
Any idea ?
There are some examples of things that I already tried below.
Regards,
Nicolas
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Header Style</title>
<style type="text/css">
span.sp { font-style: italic; color: #AAA; }
h1 { string-set: header content(); }
@page {
@top-right { content: string(header, first); font-size: 10pt; }
@top-left { content: flow(header2); font-size: 10pt; }
}
#header { flow: static(header2); }
</style>
</head>
<body>
<h1>This is a h1 title with a <span class="sp">span</span></h1>
<p>Unfortunately, the css styles of the span are not applied when the h1 is used as page header.</p>
<h1 id="header">This is another <span class="sp">test</span></h1>
<p>In this case the css styles are applied but the h1 is removed from normal flow and this is not what I want.</p>
</body>
</html>