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
  #11  
Old   
John Hosking
 
Posts: n/a

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






On Sun, 05 Jul 2009 07:10:10 GMT, Alex Bell wrote:

Quote:
John Hosking wrote:


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. ...

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.
No, the above is all (mere) HTML, with the (intrinsic) opportunity for you
to reference some elements for styling by, e.g., id selector

#preface { border:2px dashed cyan; }

by class selector

.section { color:yellow; background-color:black; }

or by type selector

div { font:100% "Times New Roman", serif; }
p { font-family: Arial, "Bell Sans", sans-serif; }

as well as other selectors. You don't *have* to use any of those selectors
at all, i.e., you don't need to mention them in your CSS; their presence in
the HTML is sufficient to *allow* you to style them if you so choose (and
CSS is on and available and compliant in the UA or e-book reader thingy).

Perhaps this link, which I often use and recommend, is of use to you, even
as an e-book author: <http://css.maxdesign.com.au/selectutorial/>. I'm not
sure what other special names you're looking for, beyond what's here in my
post and expanded upon in the selectors tutorial I linked to.

--
John
By the way, I am not really recommending using yellow text on a black BG.
In fact, I strongly recommend against it. The cyan border's goofy, too.

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

Default Re: HTML for ebooks question - 07-05-2009 , 06:51 PM






John Hosking wrote:
Quote:
On Sun, 05 Jul 2009 07:10:10 GMT, Alex Bell wrote:

John Hosking wrote:

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. ...

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.

No, the above is all (mere) HTML, with the (intrinsic) opportunity for you
to reference some elements for styling by, e.g., id selector

#preface { border:2px dashed cyan; }

by class selector

.section { color:yellow; background-color:black; }

or by type selector

div { font:100% "Times New Roman", serif; }
p { font-family: Arial, "Bell Sans", sans-serif; }

as well as other selectors. You don't *have* to use any of those selectors
at all, i.e., you don't need to mention them in your CSS; their presence in
the HTML is sufficient to *allow* you to style them if you so choose (and
CSS is on and available and compliant in the UA or e-book reader thingy).

Perhaps this link, which I often use and recommend, is of use to you, even
as an e-book author: <http://css.maxdesign.com.au/selectutorial/>. I'm not
sure what other special names you're looking for, beyond what's here in my
post and expanded upon in the selectors tutorial I linked to.

Thanks, John. That's most helpful.

I'm known for many things to many people, but technological competence
is not one them.

--
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.