![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
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 – 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. |
#12
| |||
| |||
|
|
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 – 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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |