The problem here is that you need to have a container whose width adapts to its contents. Normal block elements (<p>, <div>) are no good, it is their contents that adapt to their width, and no the other way around. But tables behave like that, so you you could use Rubén's trick with "display:table" (though I'm not sure how that interacts with long lines).
However, when it comes to centering such an element, you need to use "auto" margins. "align:center" does not work, because it controls the alignment of whatever is inside, not the positioning of the element itself. "align:center" in the parent element does not work either, because the table is a block-like element, which does not obey the align attribute. And this is when we find that "auto" margins are explicitly optional in the ePub specification, and ADE choses to ignore them (or rather set them to 0). I'm afraid there's no solution for this.
|