ferriss Posted September 5, 2022 Share Posted September 5, 2022 Hey, Most of the time I create HTML blocks with margins, as they collapse so they work well together when using a CMS. However, when using ScrollToPlugin it ignores the margin as it's outside the box-model, is there a way that I can include margin without using offsetY as offsetY will then not play ball with blocks that are full-bleed without margins. Thanks Link to comment Share on other sites More sharing options...
Solution GreenSock Posted September 5, 2022 Solution Share Posted September 5, 2022 How about just plugging the margin into the offsetY? Like offsetY: gsap.getProperty("#element", "marginTop") ? If you still need help, it'll significantly increase your chances of getting a solid answer if you include a minimal demo (like a CodePen). 👍 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now