Note margins not working in PDF output (CSS)

Having trouble installing Oxygen? Got a bug to report? Post it all here.
InspectorSpacetime
Posts: 38
Joined: Thu Jul 29, 2021 12:02 pm

Note margins not working in PDF output (CSS)

Post 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?
julien_lacour
Posts: 665
Joined: Wed Oct 16, 2019 3:47 pm

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

Post 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
InspectorSpacetime
Posts: 38
Joined: Thu Jul 29, 2021 12:02 pm

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

Post by InspectorSpacetime »

Worked like a charm. Thank you!
Post Reply