-
Notifications
You must be signed in to change notification settings - Fork 840
-
Notifications
You must be signed in to change notification settings - Fork 840
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
White Space above the image #128
Comments
did you solve this? |
No solution yet unfortunately. I also haven't had any time to troubleshoot this further, anyone else seeing this bug? |
Has anyone gotten anywhere with this? I'm having a similar issue, I have a page with two parallaxs happening. The first one works fine, but with the second one, the image stops scrolling up about 40px before it should, causing it to be jammed right up against the div below (see image). Resizing the window completely fixes it, but attempts to trigger a resize event with js don't seem to work I did accidentally manage to fix it by creating a conflict between two different versions of jQuery - I have an extremely limited knowledge of js and jQuery, so I have no idea why this would be the case - but the problem is that for me at least, this breaks something else on the page that's far more important... |
I am having this same issue |
I have the same issue. |
+1 |
I have this issue when using Bootstrap 3 nav-fixed-top navigation which "jumps out" of the site. |
@NatLuder i don´t use bootstrap and its happening to me too |
I solved it by adding to body: padding-top: 0px; |
I solved it with adding additional padding of the size of the navigation bar on top of the element which comes after the nav bar (which changes to nav-fixed-top when scrolling past the keyvisual) with jQuery. So something like:
on Hope this kinda helps at least some of you guys. |
Agree, if i add padding-top: 0px on the body its fix for me. |
Glad to help |
The
|
I actually found the source of my problem. I am also using a full width, responsive slider called LayerSlider, which is above my parallax sections. This slider area adjusts it's height as it loads, which was causing that gap at the top of my parallax element. To fix this, I waited to call parallax() until LayerSlider loaded completely, using the |
I was having this issue as well. In my case, I'm using bootstrap with parallax. Just like all of the above posters, I was running into the space issues after the user resizes the screen from 400px to 1200px or the other way around, which resulted in whitespace. I believe (to my understanding), after resizing the window, parallax.js is calculating where everything is. Next bootstrap, rearranges everything which causes some whitespace. My fix for this was: Hopefully this helps
EDIT: Also, thanks for making such a great plugin. |
#perryM123 |
Hi guys, total, total noob here, but I think there is a way round it in case if you used Add So if you don't scroll or come back to the top of the page your See this solution published online By Abhishek Sachan |
Solved with padding 0 to body From: Vlad notifications@github.com Hi guys, total, total noob here, but I think there is a way round it in case if you used parallax.style.backgroundPositionY in your function. Add if / else to your function myFunction () in document.addEventListener("scroll", myFunction), and in your else statement set ...}else{parallax.style.backgroundPositionY= "0";} So if you don't scroll or come back to the top of the page your background-position-y is set to 0. See this solution published online By Abhishek Sachanhttps://www.devstreak.com/parallax-scrolling-effect-with-pure-javascript/ You are receiving this because you commented. |
I am having this problem as well. I have two parallax elements on the same page. On both elements, the height is being calculated onLoad. The first element with the parallax works fine but on the second one, which is divided by another element that is at least 500px tall, the parallax image is being pushed down about 500px so there's a huge gap of whitespace. I thought that the script that calculates the height of the elements was the problem so I removed it but the problem persisted. The weird part is that it corrects itself on window resize. I tried the body{padding-top:0;} but that didn't help either. I am also using Bootstrap btw. |
#perryM123 thanks again |
I have a simple solution : Just call parallax effect once, when your parallax element enters screen.
|
I have a similar issue in which I have a thin white horiontal line above one of my parallax elements. No fix has worked for me as yet. However if I remove height: 100%; from the main parallax (with an Id of #Intro), the line is gone however I want the main parallax background to be 100% width and height of the screen. Line doesn't show up for Chrome but on Firefox it does. Anyone know what I should look at next? My website in question is here: http://seanprashad.me/ |
we had the problem: thanks to serdargulum, i slightly modified it into this:
|
seems to be solved for most users. summary:
|
Hi, guys! I found a new solution to this problem. If you use parallax.js, it will be really helpful. You are right, the problem is in the plugin itself. JS adds to elements with class |
I've read a few similar bugs that have been marked close, but no matter what I do, there's always a gap above my image, likely from the math of the layout being off.
I've attempted to use
$(window).trigger("resize").trigger("scroll");
and$(window).trigger('resize.px.parallax');
using on Load callbacks for the.parallax-slider
class and with other events to no success.The gap corrects itself on page resize, but only then is it correct. Any ideas?
The text was updated successfully, but these errors were encountered: