Share Posted December 9, 2017 So my issue is that everything in my tweenMax is working except the left part - it is changing color and things are good but not the movement.Why is that happening?Thanks See the Pen XzVvjO by ismailhozain (@ismailhozain) on CodePen Link to comment Share on other sites More sharing options...
Share Posted December 9, 2017 (edited) I see your issue. The <a> element needs to be `position: relative` and you need to tween that element's `left` property. Currently you are tweening the button that is inside <a>. Refer to css docs for when "left" can be used: Quote When position is set to absolute or fixed, the left property specifies the distance between the element's left edge and the left edge of its containing block. (The containing block is the ancestor to which the element is relatively positioned.) When position is set to relative, the left property specifies the distance the element's left edge is moved to the right from its normal position. When position is set to sticky, the left property behaves like its position is relative when the element is inside the viewport, and like its position is fixed when it is outside. When position is set to static, the left property has no effect. See the Pen gXVgGG by jmca (@jmca) on CodePen Edited December 9, 2017 by jmca Adding pen 4 1 Link to comment Share on other sites More sharing options...
Author Share Posted December 9, 2017 Thank you very much, it worked well and achieved the look that I wanted! 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