View Single Post
Old 09-05-2010, 07:30 AM   #3
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
You could try h3 with a left margin in % or pts so it remains invariant with font size and then use a very slightly larger left margin (also in % or pts) for a separate img carrying the underline gif. Varying the line-height on the img should give you enough control on its vertical position.
e.g.
<h3 class="chaphead">...</h3>
<div class="ornament"><img src="underline.gif" alt="" class="underlineimg"</img></div>

h3 {
margin-left: 35%; <-- alter to suit
...
}
.ornament {
margin-top: 0;
margin-left: 37%; <--alter to suit
vertical-align: top;
line-height: 0.5; <--alter to adjust vertical spacing
}

It's fiddly though, and This sort of fine-grained positional control not really supported by the css subset used in the epub standard. Might be easier just to render your chapter headings as images and embed those.
charleski is offline   Reply With Quote