View Single Post
Old 09-18-2012, 10:32 PM   #1
pete5609
petebooks
pete5609 began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2012
Location: Arlington, VA
Device: iPad
CSS ignored in some spots but not all?

This is a hard one to explain. Have formatted several ePubs for a client, mostly using BBEdit, from InDesign files (not important). Have run into one annoying bug/feature with iBooks reader on each project.

Each chapter is a separate html file, including separate files for things like Foreword, About the Author, Bibliography, as well as Chapter 1, Chapter 2, etc. All are listed in the ToC and content.opf etc.

CSS for the start of each chapter looks like:

<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>Foreword</title>
<link rel="stylesheet" href="design.css" type="text/css" />
</head>
<body>
<div id="foreword">
<div class="header">
<h1>
<span class="chapter-title">Foreword</span>
</h1>
</div>

(swap out Foreword for whatever else.)

Somehow class="chapter-title" is ignored in a few of the files, and across 3 different projects now, it's only ignored on non-numbered chapters, like Foreword or Notes. On ALL chapters that are actually called Chapter 1, it displays fine.

Here is the bit from the CSS file:

.chapter-title {
display: block;
font-family: "Knockout";
font-size: 1.6em;
letter-spacing: 0.05em;
line-height: 1;
margin-top: 1em;
margin-bottom: 0.4em;
text-align: left;
text-transform: uppercase;
-webkit-hyphens: none;
}

Nothing too weird in there.

Any ideas as to why it will only work when iBooks feels like it?

Displays fine on Adobe Digital Editions (though none of the embedded fonts display, but it displays consistently anyway.)

Thx
pete5609 is offline   Reply With Quote