View Single Post
Old 03-25-2013, 02:10 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,139
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by gm139 View Post
I am trying to convert an HTML file to AZW3 format so to read it on my kindle paperwhite.

Here is an HTML sample.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TEST</title>
</head>

<style>

body {
	margin:0;
	padding:0;
	color:#000;
	font-family:Arial, Helvetica, sans-serif;
	font-size:11.5pt;
}

.Book {
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:16.0pt;
	font-weight:bold;
	page-break-before:always;
	page-break-after:always;
}

.Chapter {
	margin-bottom:4.0cm;
	text-align:center;
	font-size:14.0pt;
	font-weight:bold;
	page-break-before:always; 
} 

p {
	margin-top: 0px;	
	margin-bottom:.0001pt;
	text-align:justify;
	text-indent:11.35pt;
}

</style>

<body>

<div class=Book>BOOK TITLE</div>

<div class=Chapter>CHAPTER TITLE</div>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</p>

</body>

</html>
Two problems:

1 - The calibre reader does not recognize the "margin-bottom:4.0cm;" tag.

2 - I send the converted file to the Kindle but it does not show the book.
class="Chapter" Note the missing quotes around the RED above

What is with everyone using Absolute values for normal margins?

margin: 0; (used in .Book is the correct form. Zero has no units

Mixed case selector names are not wrong, but you must maintain case in ALL usage. KISS
theducks is online now   Reply With Quote