View Single Post
Old 02-27-2018, 01:58 PM   #49
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 JSWolf View Post
To me, divs look like ugly code where a p would do.
Jon, yes, we know that. :-) One good thing about you, my Resident Curmudgeon, is that we always know exactly where you stand.

Quote:
Originally Posted by sjfan View Post
As far as being a container goes, they are different: a div can contain other block elements. A p cannot.
Yes, of course. I never said otherwise. And if a given section of a book, big, small or otherwise, needs to contain other block elements, then anyone with a brain would use a div. No argument.

HOWEVER, all that being said, and while I would probably expect my guys to use paragraph classes for something akin to the Blueberry sign, there isn't some Lord High Almighty of eBook Coding, handing down judgements that those who use a p, rather than a div--or vice-versa--are all going to burn in Hell. That was my point. Unlike attempting to make a naked image element, sans an enclosing element, etc., there's no definitive right/wrong for this, in the given example. Unless someone here knows of one--I mean, a definitive, authoritative guide/whatever that says, "Thou Shalt Not Use Ps for This Versus Divs."

Quote:
To me, div is better style in this case. The major difference (aside from the functional one I just mentioned) is that p connotes that the contents are a paragraph, semantically. That’s not the case here, so div is a little better in terms of expressing what’s meant. But that’s just a style difference; neither one is wrong per se.
Yes, that was my point. I was actually trying to tamp down the inevitable "is too, is not!" discussion about the realities of THIS or THAT being "the right way." That's all.

Quote:
Originally Posted by j.p.s View Post
I suspect that this is a good part of the underlying cause for the ugliness that JSWolf sees.

Intuition is sometimes difficult or seems unnecessary to articulate.
The very reason that firm like mine typically never take cleanup jobs is because HTML is relatively fluid. Sure, most elements have fixed names, in terms of the name of the element, itself, e.g., p/div/img etc., but the classes certainly aren't, and for anything beyond the basics, there are different ways to accomplish the same thing. I've lost track of the number of ways I've seen people try to do things like a multi-level indent, in MOBI, for example; one using left-margin, one using that plus padding, one using nested blockquotes (which surely is not semantically correct, but I've used that kluge, too, back in the day), etc.

So, anyway, I'm sure that we can now all agree that despite having our personal preferences, the reality is, the PC Coding Police are not going to show up on our doorsteps and haul us away for using p's versus div's, or vice-versa, for layout elements like the Blueberries signage.

Really, that's kinda the only place I was trying to get to. Peace and Harmony on the Endnotes thread.


Hitch
Hitch is offline   Reply With Quote