Closed kd-ods closed 5 years ago
https://www.caktusgroup.com/blog/2017/10/23/css-tip-fixed-headers-and-section-anchors/ from TimD - supect Sphinx will make applying this very difficult!
nods I'm trying to remember where I've grappled with this before: I think it is mostly CSS level fix though?
You need to change some HTML - that's the bit that I suspect will be hard.
Adding this seems to help:
div.section {
margin-top: -60px;
padding-top: 60px;
}
any reason we would not want to do that?
I'm not certain it's always guaranteed to be 60px, but given the use case it doesn't matter if it's slightly off. (We could try and use JS to correct for that but I think that's overkill.) I think this makes that an OK fix! I'll put that in.
This problem still exists, but is half resolved. Things are a bit more complicated than first appear. The in-page anchors as used by the menu system use the ids on the section elements, for example:
Ok, to duplicate: Go to /schema/concepts.html , go to "Data model overview", click "Entity statement". Seen in Firefox and Chrome.
Where as clicking in top menu, "Data Schema", in side menu "Schema Browser", then "Entity Statement" is fine.
I tried the suggested CSS, and tho it works it catches other page elements and destroys those, and also does something very weird to links near by! So need to work on that a bit more ....
Adding
.oods-main div.section span + h2 {
display: block;
margin-top: -3.5rem;
padding-top: 6rem;
}
and removing the
div.section {
margin-top: -60px;
padding-top: 60px;
}
from before, seems to catch the right elements and nothing extra.
Will test in different browsers, then make the change.
For example, when following a link to the entityStatement section of the schema reference:
/schema.html#entitystatement
... the 'EntityStatement' heading is hidden under the top menu.