HighDots Forums  

HTML for ebooks question

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss HTML for ebooks question in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alex Bell
 
Posts: n/a

Default HTML for ebooks question - 07-04-2009 , 04:04 AM






Forgive me if this this not the right newsgroup for this topic; I
haven't been able to find another newsgroup that might fit better.

And forgive me also for the long introduction for those who are not
familiar with ebooks.

The background to my question is that the documents on which ebooks are
based are basically HTML. Mobipocket, (owned by Amazon) perhaps the most
common format, has its own limited and idiosyncratic rendering of HTML.
Amongst many other problems it does not recognise margin-left,
margin-right, or margin auto. ePub is probably the way of the future,
and has a much better rendering, and I would like the ebooks I prepare
to meet W3C standards.

The page at http://pianoboe.net/EbookTemplate.html is _not_ designed to
be a web page. It is the beginning of a template which I can use to
prepare ebooks in future.

If you look at the Contents part and the TOC div in the CSS you will see
my attempts to get the TOC centred on the page. Is there a more elegant
or more efficient way of doing it? Better still, is there a way of
achieving the same effect without arbitrarily setting the width to some
value like 50%? I want some way to make the div's width only the same as
it's content so that the table of contents material is centred. And it's
possible that there might be a long chapter heading which would take up
more than 50% of the page. I thought that {width: auto;} might work, but
it doesn't work on a browser so I haven't bothered trying it on my ebook
reader.

Finally, if this is not the newsgroup for this kind of question can
anyone point me please to a group or forum which discusses HTML for
ebooks? I haven't been able to find much through Google apart from the
MobileRead forums.

--
Regards, Alex

Reply With Quote
  #2  
Old   
John Hosking
 
Posts: n/a

Default Re: HTML for ebooks question - 07-04-2009 , 06:12 AM






On Sat, 04 Jul 2009 08:04:21 GMT, Alex Bell wrote:
....
Quote:
The page at http://pianoboe.net/EbookTemplate.html is _not_ designed to
be a web page. It is the beginning of a template which I can use to
prepare ebooks in future.

If you look at the Contents part and the TOC div in the CSS you will see
my attempts to get the TOC centred on the page. Is there a more elegant
or more efficient way of doing it? Better still, is there a way of
achieving the same effect without arbitrarily setting the width to some
value like 50%? I want some way to make the div's width only the same as
it's content so that the table of contents material is centred. And it's
possible that there might be a long chapter heading which would take up
more than 50% of the page. I thought that {width: auto;} might work, but
it doesn't work on a browser so I haven't bothered trying it on my ebook
reader.
First, I'm going to pretend that I didn't see the line

<a name="TOC"></a> <!-- Anchors go before headings -->

in your TOC block. I don't understand its point, and this is obviously an
unfinished template page. I'll also pretend your actual TOC list items
contain links to the content below. (And since these *are* items in a list,
and not really paragraphs, why not use <ul> and <li> markup? [Possibly it's
because Jukka will suggest <ol> would be more appropriate and dorayme will
argue for using a table, but don't let /them/ scare you.])

Now (finally) to your actual question. Your approach looks good to me, and
yes, it's a bit of a pain in the neck. A table (even the non-semantic
one-celled variety) will tend to size itself to match your content. The
markup you've got, not so much.

But perhaps you'd be (somewhat) happier with something like width:20em;
instead of width:50%; on your div#TOC? That allows a certain adaptation
to font size, but you still have to know in advance that no chapter heading
is more than "a certain length" (about 18 uppercase-"M" characters long,
more characters will fit the narrower they are, assuming proportional
fonts). You can try different values for the width and see what you like.
IAC, my suggestion is a bit of a hack, and therefore unsatisfying, although
perhaps it's *less unsatisfying* than what you've got.

(Personally, BTW, I'd prefer to see a bit of padding on #TOC, esp. to the
left.)

How all this will work in an e-book reader I do not know. I also don't know
of a better place to look for help. Sorry.

HTH

--
John

Reply With Quote
  #3  
Old   
John Hosking
 
Posts: n/a

Default Re: HTML for ebooks question - 07-04-2009 , 06:56 AM



On Sat, 4 Jul 2009 12:12:20 +0200, John Hosking wrote:

Quote:
On Sat, 04 Jul 2009 08:04:21 GMT, Alex Bell wrote:
...

The page at http://pianoboe.net/EbookTemplate.html ...


First, I'm going to pretend that I didn't see the line

a name="TOC"></a> <!-- Anchors go before headings --

in your TOC block. I don't understand its point, and this is obviously an
unfinished template page.
I looked at this some more. That is, I looked at the rest of the markup,
looking beyond just the TOC block. I think I now understand what you're
trying to do. But it seems the wrong ("unbest") way to do it. I see, e.g.,

<div class="section">
<a name="Chapter04"></a> <!-- Anchors go before headings -->
<h3>Chapter 4: Chapter title</h3>
<p>Lorem ipsum dolor sit amet, ....

If all you want is an anchor for some link (like in the TOC) in the form of
href="#Chapter04" to point to, you can get rid of the extra <a> and then
assign an id to one of the other elements, such as

<div class="section">
<h3 id="Chapter04">Chapter 4: Chapter title</h3>
<p>Lorem ipsum dolor sit amet, ....

or

<div class="section" id="Chapter04">
<h3>Chapter 4: Chapter title</h3>
<p>Lorem ipsum dolor sit amet, ....

But maybe you have to do some special contortions for e-books?

--
John
Or maybe you just think you have to?

Reply With Quote
  #4  
Old   
dorayme
 
Posts: n/a

Default Re: HTML for ebooks question - 07-04-2009 , 07:08 AM



In article <7b8o9kF225j1dU1 (AT) mid (DOT) individual.net>,
John Hosking <john-nin2 (AT) bluemail (DOT) ch> wrote:

Quote:
On Sat, 04 Jul 2009 08:04:21 GMT, Alex Bell wrote:
...

The page at http://pianoboe.net/EbookTemplate.html
If you look at the Contents part and the TOC div in the CSS you will see
my attempts to get the TOC centred on the page. Is there a more elegant
or more efficient way of doing it?

....
... width:20em;
instead of width:50%; on your div#TOC? That allows a certain adaptation
to font size, but you still have to know in advance that no chapter heading
is more than "a certain length" (about 18 uppercase-"M" characters long,
more characters will fit the narrower they are, assuming proportional
fonts). You can try different values for the width and see what you like.
IAC, my suggestion is a bit of a hack, and therefore unsatisfying, although
perhaps it's *less unsatisfying* than what you've got.

(Personally, BTW, I'd prefer to see a bit of padding on #TOC, esp. to the
left.)

For sure, some padding (0.5em would be OK)! And 20em sounds very
reasonable for width. And the sky will not fall in if someone enlarges
the text, long entries will wrap.

Talking of not having to guess widths though... another shrink to fit
box, besides a table cell is a floated div. Now there is no float:
center but the thought of a float might jog OP into designing more for a
web page. Why waste all that precious top bit of the page with a couple
of words, and a small picture and all that spare white. There is a thing
called webpage sense, and the top of the given page kind of goes against
that sense if you know what I mean.

There are better design ideas. Want me to name some? Is OP willing to
redesign the top to a different plan? Perhaps he can already think of a
plan now that I mention it.

--
dorayme

Reply With Quote
  #5  
Old   
Eric Lindsay
 
Posts: n/a

Default Re: HTML for ebooks question - 07-04-2009 , 05:14 PM



In article <7b8qqbF1todvpU1 (AT) mid (DOT) individual.net>,
John Hosking <john-nin2 (AT) bluemail (DOT) ch> wrote:

Quote:
But maybe you have to do some special contortions for e-books?
Maybe the various e-book platforms should just start using HTML and CSS
in full, and let established browser engines handle a fluid layout?
Instead of trying to force e-books into a halfway house between fixed
size paper and something that fits whichever weird display size you are
selling this year.

--
http://www.ericlindsay.com

Reply With Quote
  #6  
Old   
Alex Bell
 
Posts: n/a

Default Re: HTML for ebooks question - 07-04-2009 , 07:13 PM



dorayme wrote:
Quote:
In article <7b8o9kF225j1dU1 (AT) mid (DOT) individual.net>,
John Hosking <john-nin2 (AT) bluemail (DOT) ch> wrote:

On Sat, 04 Jul 2009 08:04:21 GMT, Alex Bell wrote:
...
The page at http://pianoboe.net/EbookTemplate.html
If you look at the Contents part and the TOC div in the CSS you will see
my attempts to get the TOC centred on the page. Is there a more elegant
or more efficient way of doing it?
...
... width:20em;
instead of width:50%; on your div#TOC? That allows a certain adaptation
to font size, but you still have to know in advance that no chapter heading
is more than "a certain length" (about 18 uppercase-"M" characters long,
more characters will fit the narrower they are, assuming proportional
fonts). You can try different values for the width and see what you like.
IAC, my suggestion is a bit of a hack, and therefore unsatisfying, although
perhaps it's *less unsatisfying* than what you've got.

(Personally, BTW, I'd prefer to see a bit of padding on #TOC, esp. to the
left.)


For sure, some padding (0.5em would be OK)! And 20em sounds very
reasonable for width. And the sky will not fall in if someone enlarges
the text, long entries will wrap.

Talking of not having to guess widths though... another shrink to fit
box, besides a table cell is a floated div. Now there is no float:
center but the thought of a float might jog OP into designing more for a
web page. Why waste all that precious top bit of the page with a couple
of words, and a small picture and all that spare white. There is a thing
called webpage sense, and the top of the given page kind of goes against
that sense if you know what I mean.

There are better design ideas. Want me to name some? Is OP willing to
redesign the top to a different plan? Perhaps he can already think of a
plan now that I mention it.

Thanks to you all, but...

This is _not_ a webpage, and never will be. The document is only on my
server so people could see it. It is the very early stage of a template
for an ebook. Though ebooks are based on HTML the various formats all do
it differently - you think browser wars and proprietary website mark up
was bad? The situation with ebooks is far worse, with most manufacturers
having their own format which cannot be read by ebook readers made by
other manufacturers. Only when ePub becomes more popular will the
situation change, but I want to prepare for that happy day by using
valid markup.

The first part of the webpage would present as a title page when seen on
an ebook, and I think presents much the same as the title page of any
book. On my ebook reader that's all that the reader sees until clicking
to go to the next page - which in this case is the table of contents. I
don't agree that white space is wasted. My ebook reader has a screen
slightly smaller than the average paperback.

Ebooks do need some contortions which web pages do not. In particular
the name link _must_ go before a heading, or very often the Hn heading
tag is ignored if the link goes after the heading. I will try John's
idea, though I don't quite see how to get from the Table of Contents to
the chapter heading. I haven't put the hrefs on the TOC in yet, but they
will go in eventuality.

And I'll try putting in some padding and using width in ems.

Can I take it that there is no way of having the TOC div take its width
from its contents; that I must specify a fixed width of some size and
some units?


--
Regards, Alex

Reply With Quote
  #7  
Old   
dorayme
 
Posts: n/a

Default Re: HTML for ebooks question - 07-04-2009 , 07:35 PM



In article <HmR3m.2645$ze1.1548 (AT) news-server (DOT) bigpond.net.au>,
Alex Bell <afjbell (AT) bigpond (DOT) net.au> wrote:

Quote:
dorayme wrote:
In article <7b8o9kF225j1dU1 (AT) mid (DOT) individual.net>,
John Hosking <john-nin2 (AT) bluemail (DOT) ch> wrote:

On Sat, 04 Jul 2009 08:04:21 GMT, Alex Bell wrote:
...
The page at http://pianoboe.net/EbookTemplate.html
....
Talking of not having to guess widths though... another shrink to fit
box, besides a table cell is a floated div. Now there is no float:
center but the thought of a float might jog OP into designing more for a
web page. Why waste all that precious top bit of the page with a couple
of words, and a small picture and all that spare white. There is a thing
called webpage sense, and the top of the given page kind of goes against
that sense if you know what I mean.

There are better design ideas. Want me to name some? Is OP willing to
redesign the top to a different plan? Perhaps he can already think of a
plan now that I mention it.



This is _not_ a webpage, and never will be. The document is only on my
server so people could see it. It is the very early stage of a template
for an ebook. Though ebooks are based on HTML the various formats all do
it differently - you think browser wars and proprietary website mark up
was bad? The situation with ebooks is far worse, with most manufacturers
having their own format which cannot be read by ebook readers made by
other manufacturers. Only when ePub becomes more popular will the
situation change, but I want to prepare for that happy day by using
valid markup.

Fair enough, I was too hasty in saying about the top in your context,
too tempted by a more space saving idea that would allow a shrink to fit
float.

Quote:
The first part of the webpage would present as a title page when seen on
an ebook, and I think presents much the same as the title page of any
book. On my ebook reader that's all that the reader sees until clicking
to go to the next page - which in this case is the table of contents. I
don't agree that white space is wasted. My ebook reader has a screen
slightly smaller than the average paperback.

I was was being too revisionist, you are right.

Quote:
Ebooks do need some contortions which web pages do not. In particular
the name link _must_ go before a heading, or very often the Hn heading
tag is ignored if the link goes after the heading. I will try John's
idea, though I don't quite see how to get from the Table of Contents to
the chapter heading. I haven't put the hrefs on the TOC in yet, but they
will go in eventuality.

And I'll try putting in some padding and using width in ems.

Can I take it that there is no way of having the TOC div take its width
from its contents; that I must specify a fixed width of some size and
some units?

I do have a page that *might* help you a bit:

<http://netweaver.com.au/centring/page4.html>

--
dorayme

Reply With Quote
  #8  
Old   
Alex Bell
 
Posts: n/a

Default Re: HTML for ebooks question - 07-05-2009 , 01:09 AM



dorayme wrote:
Quote:
In article <HmR3m.2645$ze1.1548 (AT) news-server (DOT) bigpond.net.au>,
Alex Bell <afjbell (AT) bigpond (DOT) net.au> wrote:

dorayme wrote:
In article <7b8o9kF225j1dU1 (AT) mid (DOT) individual.net>,
John Hosking <john-nin2 (AT) bluemail (DOT) ch> wrote:

On Sat, 04 Jul 2009 08:04:21 GMT, Alex Bell wrote:
...
The page at http://pianoboe.net/EbookTemplate.html
...
Talking of not having to guess widths though... another shrink to fit
box, besides a table cell is a floated div. Now there is no float:
center but the thought of a float might jog OP into designing more for a
web page. Why waste all that precious top bit of the page with a couple
of words, and a small picture and all that spare white. There is a thing
called webpage sense, and the top of the given page kind of goes against
that sense if you know what I mean.

There are better design ideas. Want me to name some? Is OP willing to
redesign the top to a different plan? Perhaps he can already think of a
plan now that I mention it.


This is _not_ a webpage, and never will be. The document is only on my
server so people could see it. It is the very early stage of a template
for an ebook. Though ebooks are based on HTML the various formats all do
it differently - you think browser wars and proprietary website mark up
was bad? The situation with ebooks is far worse, with most manufacturers
having their own format which cannot be read by ebook readers made by
other manufacturers. Only when ePub becomes more popular will the
situation change, but I want to prepare for that happy day by using
valid markup.


Fair enough, I was too hasty in saying about the top in your context,
too tempted by a more space saving idea that would allow a shrink to fit
float.

The first part of the webpage would present as a title page when seen on
an ebook, and I think presents much the same as the title page of any
book. On my ebook reader that's all that the reader sees until clicking
to go to the next page - which in this case is the table of contents. I
don't agree that white space is wasted. My ebook reader has a screen
slightly smaller than the average paperback.

I was was being too revisionist, you are right.

Ebooks do need some contortions which web pages do not. In particular
the name link _must_ go before a heading, or very often the Hn heading
tag is ignored if the link goes after the heading. I will try John's
idea, though I don't quite see how to get from the Table of Contents to
the chapter heading. I haven't put the hrefs on the TOC in yet, but they
will go in eventuality.

And I'll try putting in some padding and using width in ems.

Can I take it that there is no way of having the TOC div take its width
from its contents; that I must specify a fixed width of some size and
some units?


I do have a page that *might* help you a bit:

http://netweaver.com.au/centring/page4.html

Thanks. I've bookmarked the page and will give it a try. I fear that the
ebook readers will choke on the margin: auto; bit.

--
Regards, Alex

Reply With Quote
  #9  
Old   
John Hosking
 
Posts: n/a

Default Re: HTML for ebooks question - 07-05-2009 , 01:50 AM



On Sat, 04 Jul 2009 23:13:43 GMT, Alex Bell wrote:

Quote:
dorayme wrote:
In article <7b8o9kF225j1dU1 (AT) mid (DOT) individual.net>, John Hosking wrote:

On Sat, 04 Jul 2009 08:04:21 GMT, Alex Bell wrote:
...
The page at http://pianoboe.net/EbookTemplate.html
If you look at the Contents part and the TOC div in the CSS you will see
my attempts to get the TOC centred on the page. Is there a more elegant
or more efficient way of doing it?
...
... width:20em;
instead of width:50%; on your div#TOC? That allows a certain adaptation
to font size, but you still have to know in advance that no chapter heading
is more than "a certain length" (about 18 uppercase-"M" characters long,
more characters will fit the narrower they are, assuming proportional
fonts). You can try different values for the width and see what you like.
IAC, my suggestion is a bit of a hack, and therefore unsatisfying, although
perhaps it's *less unsatisfying* than what you've got.

(Personally, BTW, I'd prefer to see a bit of padding on #TOC, esp. to the
left.)


For sure, some padding (0.5em would be OK)! And 20em sounds very
reasonable for width. And the sky will not fall in if someone enlarges
the text, long entries will wrap.

Talking of not having to guess widths though... another shrink to fit
box, besides a table cell is a floated div. Now there is no float:
center but the thought of a float might jog OP into designing more for a
web page. ...



Thanks to you all, but...
YVW. And thanks for bringing it up here, OT though it may be. I've never
tried authoring for an e-book, so without this thread I wouldn't know of
the limitations of the medium.

Quote:
This is _not_ a webpage, and never will be. The document is only on my
server so people could see it. It is the very early stage of a template
for an ebook. Though ebooks are based on HTML the various formats all do
it differently [etc., trimmed here]

The first part of the webpage would present as a title page when seen on
an ebook, and I think presents much the same as the title page of any
book. On my ebook reader that's all that the reader sees until clicking
to go to the next page - which in this case is the table of contents. I
don't agree that white space is wasted. My ebook reader has a screen
slightly smaller than the average paperback.
Seems like a float:left, as long as it's supported at all, would be just
fine for your purposes. On a Web page, browsers will give a float
shrink-to-fit sizing, so maybe you can use it, too. (Although if you set
the width of #TOC to be the full size of the viewport, you can forget about
the need to center it; the user sees the entire gray box, and only the gray
box, with the chapter headings left-aligned within it. Right? I guess
probably not, or you wouldn't be asking the question.)

Quote:
Ebooks do need some contortions which web pages do not. In particular
the name link _must_ go before a heading, or very often the Hn heading
tag is ignored if the link goes after the heading. I will try John's
idea, though I don't quite see how to get from the Table of Contents to
the chapter heading. I haven't put the hrefs on the TOC in yet, but they
will go in eventuality.

<div id="TOC">
<h3>Table of Contents</h3>
<p><a href="#preface">Preface or Foreword</a></p>
<p><a href="#Chapter01">Chapter 1: Chapter Title</p>
<p><a href="#Chapter02">Chapter 2: Chapter Title</a></p>
<p><a href="#Chapter03">Chapter 3: Chapter Title</a></p>
<p><a href="#Chapter04">Chapter 4: Chapter Title</a></p>
<p><a href="#preface">Colophon or Afterword</a></p>
</div>

<div class="section" id="preface">
<h3>Preface</h3>
<p>Preface text goes here &ndash; generally information about the
author and the book.
<p><a href="#TOC">Back to Contents</a></p>
</div> <!-- End of Preface div; page break in CSS -->

<div class="section" id="Chapter01">
<h3>Chapter 1: Chapter title</h3>
<p>Lorem ipsum dolor sit amet, ....

...interdum at, aliquam vel, felis.</p>
<p><a href="#TOC">Back to Contents</a></p>

and so on. (Again, for you to test in your own, special, e-book world of
bizarre mysteries. ;-) )

Quote:
Can I take it that there is no way of having the TOC div take its width
from its contents; that I must specify a fixed width of some size and
some units?
Floats, as mentioned by dorayme; tables, as mentioned by us both. Unless
e-book reader rebel against such alien concepts.

GL.

--
John

Reply With Quote
  #10  
Old   
Alex Bell
 
Posts: n/a

Default Re: HTML for ebooks question - 07-05-2009 , 03:10 AM



John Hosking wrote:
Quote:
On Sat, 04 Jul 2009 23:13:43 GMT, Alex Bell wrote:

dorayme wrote:
In article <7b8o9kF225j1dU1 (AT) mid (DOT) individual.net>, John Hosking wrote:

On Sat, 04 Jul 2009 08:04:21 GMT, Alex Bell wrote:
...
The page at http://pianoboe.net/EbookTemplate.html
If you look at the Contents part and the TOC div in the CSS you will see
my attempts to get the TOC centred on the page. Is there a more elegant
or more efficient way of doing it?
...
... width:20em;
instead of width:50%; on your div#TOC? That allows a certain adaptation
to font size, but you still have to know in advance that no chapter heading
is more than "a certain length" (about 18 uppercase-"M" characters long,
more characters will fit the narrower they are, assuming proportional
fonts). You can try different values for the width and see what you like.
IAC, my suggestion is a bit of a hack, and therefore unsatisfying, although
perhaps it's *less unsatisfying* than what you've got.

(Personally, BTW, I'd prefer to see a bit of padding on #TOC, esp. to the
left.)

For sure, some padding (0.5em would be OK)! And 20em sounds very
reasonable for width. And the sky will not fall in if someone enlarges
the text, long entries will wrap.

Talking of not having to guess widths though... another shrink to fit
box, besides a table cell is a floated div. Now there is no float:
center but the thought of a float might jog OP into designing more for a
web page. ...


Thanks to you all, but...

YVW. And thanks for bringing it up here, OT though it may be. I've never
tried authoring for an e-book, so without this thread I wouldn't know of
the limitations of the medium.

This is _not_ a webpage, and never will be. The document is only on my
server so people could see it. It is the very early stage of a template
for an ebook. Though ebooks are based on HTML the various formats all do
it differently [etc., trimmed here]

The first part of the webpage would present as a title page when seen on
an ebook, and I think presents much the same as the title page of any
book. On my ebook reader that's all that the reader sees until clicking
to go to the next page - which in this case is the table of contents. I
don't agree that white space is wasted. My ebook reader has a screen
slightly smaller than the average paperback.

Seems like a float:left, as long as it's supported at all, would be just
fine for your purposes. On a Web page, browsers will give a float
shrink-to-fit sizing, so maybe you can use it, too. (Although if you set
the width of #TOC to be the full size of the viewport, you can forget about
the need to center it; the user sees the entire gray box, and only the gray
box, with the chapter headings left-aligned within it. Right? I guess
probably not, or you wouldn't be asking the question.)
Thanks, but so far as I can tell so far the Mobipocket format does not
recognise float at all.
And I really do want the TOC contents (Preface, Chapter 1...) to be
centred. Dorayme mentioned waste of white space; to me having the links
down the left margin and the rest of the page white space looks unbalanced.
Quote:
Ebooks do need some contortions which web pages do not. In particular
the name link _must_ go before a heading, or very often the Hn heading
tag is ignored if the link goes after the heading. I will try John's
idea, though I don't quite see how to get from the Table of Contents to
the chapter heading. I haven't put the hrefs on the TOC in yet, but they
will go in eventuality.


div id="TOC"
h3>Table of Contents</h3
p><a href="#preface">Preface or Foreword</a></p
p><a href="#Chapter01">Chapter 1: Chapter Title</p
p><a href="#Chapter02">Chapter 2: Chapter Title</a></p
p><a href="#Chapter03">Chapter 3: Chapter Title</a></p
p><a href="#Chapter04">Chapter 4: Chapter Title</a></p
p><a href="#preface">Colophon or Afterword</a></p
/div

div class="section" id="preface"
h3>Preface</h3
p>Preface text goes here &ndash; generally information about the
author and the book.
p><a href="#TOC">Back to Contents</a></p
/div> <!-- End of Preface div; page break in CSS --

div class="section" id="Chapter01"
h3>Chapter 1: Chapter title</h3
p>Lorem ipsum dolor sit amet, ....

...interdum at, aliquam vel, felis.</p
p><a href="#TOC">Back to Contents</a></p

and so on. (Again, for you to test in your own, special, e-book world of
bizarre mysteries. ;-) )
Now that looks good! I like it and will give it a try. Do I need some
definition of e.g. preface to set it up as having an id in the external
CSS file? Is there a name for this technique so I can look it up? I'm
certainly not an expert, but I don't remember it being described in any
of my reading.
Quote:
Can I take it that there is no way of having the TOC div take its width
from its contents; that I must specify a fixed width of some size and
some units?

Floats, as mentioned by dorayme; tables, as mentioned by us both. Unless
e-book reader rebel against such alien concepts.
As mentioned floats are out for Mobipocket at least; I haven't got to
ePub yet. I'm researching display: table right now.

Oh, and I should have mentioned earlier that almost all ebook readers
give the user the ability to vary the size of the font. My Cybook Gen3
gives me the choice of 10 different sizes. This is of course another
reason for using em dimensions.
Quote:
GL.


--
Regards, Alex

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.