View Single Post
Old 09-07-2020, 12:20 PM   #5
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Turtle91 View Post
I concur 100% !

There is no real reason to use <div> tags when defining a normal paragraph - just use a paragraph tag:

Code:
Change:
<div id="box3_539" class="para-normal-local4"><span class="char-normal-local2">yadda yadda yadda.</span></div>

<div id="box3_540" class="para-normal-local4"><span style="font-family: 'Times New Roman', 
TimesNewRomanPSMT, Times, serif; font-size: 0.77419em; line-height:1.2;">yadda yadda yadda.</span></div>

To:
CSS: 
p {font-family: serif}

HTML:
<p id="box3_539">yadda yadda yadda</p>
<p id="box3_540">yadda yadda yadda</p>
You could even lose the id tags unless there is some very compelling reason that you need to identify each paragraph independently??

Having all those inline styling, and classes saying "this is a normal paragraph" (instead of just using a normal paragraph tag) really bloats up your code and makes it much more complex than it needs to be.

It is much easier to have your styling in a centralized location (like a style sheet) where you can make changes to a single location and have it apply to your entire book...instead of having to update every paragraph every time.

There are definitely good arguments saying you shouldn't define the font, font-size, line-height, paragraph indents, etc. and you should leave that up to the users/readers to select in their own app/device...but that is your choice.

A couple good regex search and replace can fix your entire book very quickly.
Not to mention, I suspect STRONGLY that this would not be very accessible-friendly.

I wish I knew what online "guru" started this "div instead of paragraphs" stuff, I really do.

Hitch
Hitch is offline   Reply With Quote