View Single Post
Old 05-05-2015, 05:20 PM   #85
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,557
Karma: 93980341
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by murg View Post
While true in theory, not practiced this way.

Generally, you'd use a <h1> (or other heading level) tag to delineate the chapter heading. This is fine and wonderful, but rather then using the CSS to define what the <h1> tag looks like, they do this: <h1 class="c1">

What's worse is when this is defined as <div class="c1">, which removes all content from the equation.

By embedding CSS classes in all (or almost all) of the HTML tags, the designers are tying the book vary tightly to the formatting. Which is what CSS is supposed to prevent. If you used simple tags <p>, and move the formatting into the CSS (p {text-indent: 1em;}, then all you have to do to change the formatting is change the CSS file.
I'm afraid that I strongly disagree with you. <h1 class="chapter-heading"> in the HTML file, and a "chapter-heading" class in the CSS file results in far more maintainable code than your suggestion. Class names should tell you what the style is used for, because you may very well want to use the same tag for many different purposes in the book.

This is probably a more appropriate topic for discussion in the "ePub" forum, though.
HarryT is offline   Reply With Quote