View Single Post
Old 12-24-2013, 03:21 AM   #101
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 stevelitt View Post
What's wrong with divs and spans? I have span.code and span.emph and span.definition. I have div.titlepage, which sets everything bold and center, and then inside that I have p.title, p.author, etc, each with its own size. You can't replace a div with a p , because p can't contain other paragraphs.

SteveT
Steve:

There's nothing "wrong" with divs or spans used where appropriate. What we were all discussing here is the sloppy use of them in lieu of more appropriate coding, for example, an inline style div instead of using em or strong, or bold or italic. Most epubs ought to have as much of the styling defined in the CSS as possible, as opposed to inline, on the fly styles.

For example, I stupidly (I've told this story here before) once agreed to take on and "fix" an ePUB that was purportedly completed, to rebuild into a MOBI. Some 66 spans later, named sequentially, "char-override style 1" through "char-override-style-66," I regretted it enormously. Or spans to achieve a font size (e.g., font-size 80%, or some such) instead of a named class. Once someone gets in the habit of "on the fly" styling spans, it's really no different than the ad hoc styling that we all get to see far too often from ill-created Word files, or worse, the output from something like Adobe Acrobat Pro to an "exported Word file," which is usually pretty catastrophic. ;-)

And yes, divs are for dividing up sections of screen/pages and to contain other elements. But spans tend to be the output children of programs that are intended for print, and thus, make for sloppier, less discernible coding. That's all.

Hitch
Hitch is offline   Reply With Quote