Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image horizontal background position ignored #215

Closed
hidegh opened this issue Nov 12, 2022 · 1 comment
Closed

Image horizontal background position ignored #215

hidegh opened this issue Nov 12, 2022 · 1 comment

Comments

@hidegh
Copy link

hidegh commented Nov 12, 2022

Issue description:

See #141 - setting the horizontal position works, but the vertical is always sticking to the bottom.

Since the data attribute allows both values to be set and then the library is then repositioning the image always to bottom, I'd say it's probably a bug.

NOTE: based on the original position, screen's height, parallax speed we'd ev. know how much reserve we'd need and thus the vertical alignment could be more flexible.

Version used:

2.0.4

Code to reproduce the issue (HTML blocks + JavaScript initialization)

          <div class="h-100 w-100 jarallax" data-jarallax data-type="scale" data-speed="-1" data-img-position="0% 50%">
            <img class="jarallax-img" src="/assets/bg/team/pexels-fauxels-3184355.jpg">
          </div>
@nk-o
Copy link
Owner

nk-o commented Nov 17, 2022

Most probably your image already has a full height covered and there is no space to move its position. Try to add Portrait photos - the vertical position will work, but the horizontal - not.

@nk-o nk-o closed this as completed Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants