Thread: Keyboard .....?
View Single Post
Old 06-05-2022, 04:42 AM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,836
Karma: 146918083
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
You steal it from books you like.
Almost every device/browser has defaults if you do not use your own (CSS is the clean way) to Style.

Code:
<body>
<h3>Chapter 3</h3>
<p>The Moon shown brightly over the hills.</p>
<\body>
is perfectly valid (and Jon, being a minimalist, would mostly approve ) using whatever the device wanted.

Think of Styles as overriding the defaults. Since no one can agree what thos should be, it really is better if you use YOUR exact preference.
Yes, being a minimalist is a good thing. It means a lot less code bloat an the code being as minimal as possible means less chance of any program/device having a problem with it.

There are some defaults to use. Use the default font, font size (for the main body font) and use the default line height. Some programs/devices allow you to set your own and may not work well if you have them set in CSS.

Oh and as for the code above, I would use <h2> instead as I like the <h2> default side for a chapter title.

For that code snippet, this is the CSS I would use.

CSS
Code:
body {
  widows: 1;
  orphans: 1;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  text-align: justify;
}
h2 {
  text-align: center;
  font-weight: bold;
}
.noindent {
  text-indent: 0;
}
p {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 1.2em;
}
HTML
Code:
<body>
<h2>Chapter 3</h2>
<p class="noindent">The Moon shown brightly over the hills.</p>
<\body>

Last edited by JSWolf; 06-05-2022 at 04:44 AM.
JSWolf is offline   Reply With Quote