Forum How do I...?

Page xref (link to top of page) issue

I'm currently using prince

    a.xref::after {
      content: target-counter(attr(href, url), page);

<a href="#SOME-ID" class="xref"></a>

To place page numbers (with link) to content in various positions throughout document. This works correctly. However in some cases with the linking it goes to the EXACT id position, is there a way to make the link go to the top of the page the link exists on in some cases?

Thanks everyone for your time in advance.