-
Notifications
You must be signed in to change notification settings - Fork 57
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
Rendering issue when parent element is smaller than fixed div height - fix included #43
Comments
I think you could investigate why your body is shorter than it's content. On Tuesday, 5 July 2016, Vandana Gopal [email protected] wrote:
|
Yes it is due to floating elements. However I do not have control over it since I am using Zurb foundation to render the page - foundation has it's own css and javascript which is setting various elements to floating. |
Try adding .clearfix to the body
http://foundation.zurb.com/sites/docs/float-classes.html
|
Hi,
Am facing an issue where I attach my fixed div to the body of the page. But the body height itself is just 119. But the height of the fixed div is 350. In that case the fixed div gets a negative top value and is hidden at the top of the page.
To fix this, I changed this line in fixto.js in the _adjust function -
The value for this._parentBottom is the body height which is 119. But this.child.offsetHeight is 350. So diff becomes negative and child.top becomes negative.
Changed it to
Then this line:
Sets it to 0.
But now I wonder what is the use of the diff variable? It will most likely always be 0 with my change.
Please advise.
Thanks.
The text was updated successfully, but these errors were encountered: