Page 1 of 1

Note margins not working in PDF output (CSS)

Posted: Tue Mar 29, 2022 10:45 pm
by InspectorSpacetime
Hello,

I'm working with a task topic in Oxygen Editor 23.1, and using the PDF transformation based on HTML5 & CSS.

Some of my task steps have notes in them. As it is, I find there's too little space between the "note box" and the next step, and I'm trying to add some more using the CSS "margin-bottom" command. But it's not working in the PDF output. I've tried commands such as

Code: Select all

div.note {
	margin-bottom: 100px !important;
}
to no avail (the 100px is just a test to see if it's working at all, it's obviously too much). I've also tried with the *[class ~= "topic/note"] and other selectors, but not getting any success. What's more confusing is that when I open the merged.html file in the browser, the margins are working! So it seems like a problem with the PDF output only.

Any idea what I'm doing wrong?

Re: Note margins not working in PDF output (CSS)

Posted: Wed Mar 30, 2022 12:00 pm
by julien_lacour
Hello,

You are doing nothing wrong, this problem has been solved since Oxygen 24.0
You can either upgrade your Oxygen application to 24.0 (or even 24.1 if possible) or use the following rule instead of div.note:

Code: Select all

*[class~="task/step"]:has(* *[class~="topic/note"]) {
  margin-bottom: 100px;
}
Regards,
Julien

Re: Note margins not working in PDF output (CSS)

Posted: Wed Mar 30, 2022 7:02 pm
by InspectorSpacetime
Worked like a charm. Thank you!