Forum How do I...?

header elements and css

jokjus
I'm trying to find any way (however hackish will do... just need this to be solved quickly) to detect a page break. This is absolutely essential in my case, since I'm having a very long document that flows freely for hundreds of pages. If I cannot detect whether an element is the first on page or not, it'll create extra margin randomly on top of the page.

Does CSS recognize html elements inside page header?

For example in my page header there's <div class="logo"> and in my page content there's <div class="path">.

Does Prince understand css like: .logo + .path if path-div is the first element on page?
mikeday
No, that won't work. Could you remove the top margin from the element, and put bottom margin on the element that comes before it?