# Scroll Snapping - IMPLEMENTATION PROBLEMS

**URL:** <https://forum.readymag.com/t/scroll-snapping-implementation-problems/2230>\
**Category:** Custom code\
**Created:** [November 30, 2023, 10:50pm UTC](https://forum.readymag.com/t/scroll-snapping-implementation-problems/2230 "2023-11-30T22:50:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SebaRosas](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.readymag.com/sebarosas/32/1540_2.png) [@SebaRosas](https://forum.readymag.com/u/SebaRosas)\
**Post date:** [November 30, 2023, 10:50pm UTC](https://forum.readymag.com/t/scroll-snapping-implementation-problems/2230/1 "2023-11-30T22:50:07Z")

</div>

Hello Readymag community, I’m trying to give a hand to a friend thats need to do a Scroll Snapping in a web for a client.

I’m trying to implement this code:  
[https://codepen.io/team/css-tricks/pen/yLLqqgP](https://codepen.io/team/css-tricks/pen/yLLqqgP)

I try to call the containers for a class they all have in common it’s “rmwidge”, but then when I tray to saw if it’s works, of course the scroll snapping doesn’t woks and some text containers brokes.

This is the edited code I’m trying to implement.

After :

```auto
<script>
  
  const gra = function(min, max) {
    return Math.random() * (max - min) + min;
}
  
const init = function(){
	let items = document.querySelector('.rmwidget');
	cssScrollSnapPolyfill()
}
init();
  
  
</script>

```

CSS:

- {  
box-sizing: border-box;  
}  
html {  
scroll-snap-type: mandatory;  
scroll-snap-points-y: repeat(100vh);  
scroll-snap-type: y mandatory;  
}  
.rmwidget {  
border-bottom: 1px solid white;  
padding: 1rem;  
height: 100vh;  
scroll-snap-align: start;  
position: relative;  
}

```auto

If some one could give me a hand I would be very greatfull,
already thanks all!

Sebastian.
```

---

<div class="post-metadata">

**Author:** ![Michael\_Clarke](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.readymag.com/michael_clarke/32/2416_2.png) [@Michael\_Clarke](https://forum.readymag.com/u/Michael_Clarke)\
**Post date:** [October 17, 2024, 3:57am UTC](https://forum.readymag.com/t/scroll-snapping-implementation-problems/2230/2 "2024-10-17T03:57:07Z")

</div>

Any chance you ever found a solve for this? Does anyone have an recommendations on how to implement snap scrolling?! Thank you!!!
