cmb69 / onepage_xh

Tools for creating "one pagers" with CMSimple_XH
GNU General Public License v3.0
3 stars 2 forks source link

Scroll with offset value #49

Open frase-git opened 3 years ago

frase-git commented 3 years ago

Onepage pages often have a fixed header. The height of the header should be taken into account as an offset value when scrolling to the IDs.

In my example the header always has exactly a height of 100px. So I helped myself by entering -100 in this line instead of the value 0. (I don't know if this is the right place - but in my attempts it didn't work in other places, or there was a "flash".)

Of course, this is only an individual workaround. The value should be configurable.

Unfortunately, there are also one-page templates where the height of the header can change.

Perhaps one should offer: Either: input of a fixed scroll offset value. Or: Automatic calculation of the height of the header as scroll offset value. Of course, it would be ideal to have both options.