View Single Post
Old 04-01-2012, 09:54 PM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,884
Karma: 6120478
Join Date: Nov 2009
Device: many
Hi,

Thanks for your response. I don't want to use them. I am finding them in the wild inside epubs and they are not being viewed properly by some ebook readers that I have access to (and not all browsers either) and are not handled properly by lxml, html5lib and libxml2 which are often used to parse xhtml and is typically used inside ebook reading / handling software like kindlegen, calibre, sigil, etc.

I think the "clearfix" example is often used to fix bugs when using css to float and image right or left. This float behaviour often needs to be cleared. The div can contain a class that actually clears the float but not contain anything else as the following text needs to wrap around the floated image. The others are simply strange to me but they do exists even inside commercial epubs.

I was hoping that someone would have some idea if they were actually legal xhtml or an artifact of xml processing software used to improperly handle xhtml code.

KevinH


Quote:
Originally Posted by DaleDe View Post
Self closing tags should be those things that don't have data. There is no reason to have a <div> that is self closing. It makes no sense at all as div is meant to enclose something. You can just assign the id to a different tag. There is generally no reason to use the a tag by itself any longer for the same reason. I wouldn't bother using it for title either.
KevinH is offline   Reply With Quote