Login  Register

Re: float margin differs

Posted by patrix on Dec 10, 2019; 3:51pm
URL: https://discuss.asciidoctor.org/float-margin-differs-tp7403p7408.html

I figured it out.

I need to clear the floats. I do this by adding [.clearfix] in front of all sections or at other relevant points.

What I do not like about this solution is that [.clearfix] generates a <div>, if there is no block after the [.clearfix] than it will not close the <div> (or it does it somewhere, where I did not expect it).

Can we detect this fact of not having a block after the [.clearfix] and (for those cases only) just add </div> in the same line?