Scroll-snap to center projects in the view height
-
Hi everybody,
I want to use the scroll-snap in css to center my .row in the vh.
It is possible? I try but i seems there are too many div or css between the body and the .row.It works when i put the overlay:scroll; to the main-region but no intro and no footer...
Example: https://codepen.io/jdevaud/pen/ZNOKNo
Any ideas?
Thanks and have a nice week-end.
-
Dear @joackim
to integrate a scroll snap – you probably need to use Javascript. So first you need to have a look here:http://laytheme.com/documentation.html#custom-javascript
Best!
Marius
-
-
Yes,
It might be a tricky one.
A snap function is not easy. To achieve it – I recommend to have a close look at least into jQuery.Best!
Marius
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it
Forgot your key, lost your files, need a previous Lay Theme or Addon version?
Go to www.laykeymanager.com