View Single Post
Old 07-15-2009, 01:39 AM   #4
rogue_ronin
Banned
rogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-books
 
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
Quote:
Originally Posted by pdurrant View Post
I've taken a look at your HTML. The main thing I'd mention is that you shouldn't have explicit display coding in the text. For example

<p><strong>IN</strong> submitting Captain Carter's strange manuscript to you in book form, I believe that a few words relative to this remarkable personality will be of interest.</p>

Would be a lot better as

<p><span class="firstword">In</span> submitting Captain Carter's strange manuscript to you in book form, I believe that a few words relative to this remarkable personality will be of interest.</p>
You are quite right. That formatting was left over from the original source, and while I noted it when I did the conversion, I did no thinking about it.

I took a while to respond to you, partly because I wanted to check on pseudo-elements: I thought that there was a first-word pseudo-element, but there isn't (there are first-line and first-letter, as I'm sure you know.)

So I will definitely do what you suggest, and I'll add the <span class="firstword"> element to my tools.

Quote:
and then in the CSS have

span.firstword { text-transform: uppercase; font-weight: bold }
Right on. Or any other sort of transformation.

Quote:
Also, in the CSS you can specify the indent and paragraph spacing, and for the first paragraph in a chapter you can also specify no indent.

div.body p { text-indent: 1em; margin: 0em 0em 0em 0em }
div.body h4+p { text-indent: 0em; margin: 0em 0em 0em 0em }

(alternatively we could have given paragraphs requiring no indent because they're the first in a chapter a specific class)
Y'know, this'll sound ignorant, but I've never thought about first-paragraph spacing before -- now that you mention it, I realize it is the norm. Strange, considering how important reading has been to my life. I'll definitely do something like this. Is there a first-paragraph pseudo-class?

The div.body h4+p example -- could you expound on it? Particularly the + -- my quick search failed...

I did find something on the :first-child pseudo-class: would this be relevant?

Quote:
I've found http://htmldog.com/ to be a very useful site for finding out about CSS.
I keep coming back to w3schools.com, myself -- I'll take a look at htmldog, though!

I've read the CSS tutorial at w3schools once -- I'm off to read it again!

Thank you for helping!

m a r
rogue_ronin is offline   Reply With Quote