I have some texts with key terms and definitions, where I'm trying to print the definitions in a "sidebar". This is done using a "display: inline; float: left; clear: left; margin: 0 0 1em -41%;" span for the definitions, which generally works fine.
However, if two key terms with definitions are placed too closely in the text, their definitions will overlap in the "sidebar". This doesn't appear to happen in Chrome or Firefox, but does happen when Prince renders them. It seems like perhaps the "clear: left" is being ignored. (Note that using "display: block" doesn't help.)
Is there a way to get the two definitions to not overlap? I'm willing to add extra markup (as long as it can be done automatically - there are thousands of such definitions, and it's not practical to review them all manually), or change the CSS if necessary, but nothing I've tried has made it work as I'd expect.
I've attached a simplified HTML file example that shows the issue (doesn't overlap in Firefox or Chrome, does in Prince) and a copy of the PDF generated by prince-9.0r5-macosx.
However, if two key terms with definitions are placed too closely in the text, their definitions will overlap in the "sidebar". This doesn't appear to happen in Chrome or Firefox, but does happen when Prince renders them. It seems like perhaps the "clear: left" is being ignored. (Note that using "display: block" doesn't help.)
Is there a way to get the two definitions to not overlap? I'm willing to add extra markup (as long as it can be done automatically - there are thousands of such definitions, and it's not practical to review them all manually), or change the CSS if necessary, but nothing I've tried has made it work as I'd expect.
I've attached a simplified HTML file example that shows the issue (doesn't overlap in Firefox or Chrome, does in Prince) and a copy of the PDF generated by prince-9.0r5-macosx.