Saturday, 2 April 2016

(help!)Parent's div height set to 0 when child gets position: fixed.

I'm having the header get fixed when i scroll below a certain point. I do this with addclass(".fixedHeader") in jQuery.

All good so far.

The problem is when I have a div that is the parent of the header div, and I want it to remain in the top. I want this because I need to compensate for the lost height when the header gets fixed, else the page will jump down.

I have set the parent divs height to the same as the header div, but it's height is set to 0 the moment the child header gets position: fixed. Any ideas?



Epic visual tool

Epson 5030UB 2D/3D 1080p 3LCD Projector Submitted April 02, 2016 at 06:29PM by reditttr http://ift.tt/1X6FdH6

No comments:

Post a Comment