YAY! I'm
so glad that it worked for you!
Quote:
Originally Posted by Kratos
I'm a bit of a perfectionist (sorry.)
|
I am a perfectionist also

, so I understand.
As you will recall, your code originally looked like this:
Code:
<mbp:pagebreak />
<p class=MsoNormal style='line-height:150%'><b><span style='font-size:12.0pt;
line-height:150%;font-family:"Times New Roman"'> </span></b></p>
<b><u><span style='font-size:18.0pt;line-height:115%;font-family:"Times New Roman";
color:black'><br clear=all style='page-break-before:always'>
</span></u></b>
<h1 class="heading1style" id="_Toc289087672">My Chapter One Name</h1>
<br>
</h1>
Two of the lines I suggested that you remove were those last two, highlighted in red.
Every <h1> tag should have a corresponding <
/h1> in order to "end" it. (That's what the forward-slash means there.) As you can see, your chapter title is wrapped in a pair of <h1> and </h1>, but I see no <h1> in the code you supplied that goes with that very last </h1> (right after <br>). It's possible that there's an <h1> somewhere
above the code snippet you supplied in that earlier post. I don't know why it would've been done that way, though. The wonders of MS Word to HTML conversion.
Quote:
On testing I saw I had two more problems which I believe I fixed.
Some of my chapters required a page break underneath the title. I originally removed these lines of code.
But then I saw there was no space between chapter title and text so I put them back, I have my space and it looks great. But would the br still work without /h1? Or does the /h1 need to stay in?
|
The answer may depend on whether there is a <h1> somewhere above the code snippet that you provided earlier. You don't want to have an <h1> without a corresponding </h1> to close it. You might want to see if you can find an unpaired <h1> above that code snippet. I can't imagine why there
would be one, but if there is, you should keep the </h1>.
If I would have done the coding, I would have included spacing under the chapter headings by using the h1
style to add that extra space, rather than using <br>. Remember this style code?
Code:
#h1
{page-break-before:always;
margin:0pt;
margin-bottom:.0001pt;
line-height:115%;
page-break-after:avoid;
font-size:18.0pt;
font-family:"Times New Roman";
color:black;
font-weight:bold;
text-decoration:underline;}
You could substitute the
.0001pt in that line highlighted in red above with a larger pt (point) value. You could try 5pt and see how that looks. Increase or decrease as you like. But this would only be done if you removed all the unneeded <h1> (if it exists), <br> and </h1>.
Quote:
What I did was delete those first two paras, and add that mbp line, it now looks like this..
Code:
<mbp:pagebreak />
<p class=MsoNormal><a name=toc></a><b><u><span style='font-size:18.0pt;
line-height:115%;font-family:"Times New Roman"'><br>
Contents</span></u></b></p>
In testing the file the toc now is consistent. It works. I just wanted to make sure that removing those lines is safe and wont unravel everything. And if it is safe for me to have deleted them why were they even in there?
|
I think it should be fine the way you have the TOC coding now. As for why MS Word put the coding there in the first place -- who knows? It puts
all kinds of unnecessary coding into the HTML. When I converted my husband's book from MS Word to HTML, it was one big pain in the *** to clean up! (Search and replace can be your friend.)
I hope you're happy with the results!