Quote:
Originally Posted by indieauthor83
Hi,
I've created a mobi file that I'm really happy with it, but I'm having trouble with my headers. Here's my html code:
<div style="page-break-after:always">
<p align="center">
<a name="whatisconfidence">
<img src="meonbeach.jpg" border="0" height="433" width="247"/></a></p></div>
<p><h2>What is confidence?</h2>
Just to point out, I only added the 'page-break-after:always' because the image was appearing on a seperate page. But it still hasn't made a difference.
I basically want the above image to appear on the same page as the H2 header. But by default the H2 header starts at the top of the screen on a seperate page. So my image that I want to appear at the top of the screen before the header, now is alone on it's own page, looking out of place.
Can anyone help me with this?
Thanks in advance
Zoe
|
Zoe:
You are thinking about it backwards. Do it like this:
<div> (lose the page-break after here, it's wrong)
<h2> <img src="meonbeach.jpg" border="0" height="433" width="247"/></h2></div>
<h2>What is confidence?</h2></div>
And then simply don't display the first h2. That's all there is to it. Create an appropriate class for the image. You don't need the div, actually, but...and why is the link there? Is that for your HTML TOC? If it is, put the link to the html PAGE, not the heading. If you have everything in one big long file (I think I recall that's the case, is that right?), then give the h2 heading that encases the image an id, and link to that, e.g., "chap12" or whatever it is. Does that make sense to you? YOU're using the Calibre ePUB or HTML editor (I don't use that, myself, so I don't know which terminology is right).
Hitch