Skip to content Skip to sidebar Skip to footer

Positioning Nav Bar At The Bottom Of The Viewport Which Also Always Remains At The Bottom Of The Div

There are 3 divs, 1st div has a logo and 2nd one has slider in it and 3rd div is navigation, I want my navigation div to be fixed at the bottom of the viewport which becomes sticky

Solution 1:

The site you link to is using javascript to achieve that. I do not think it is possible to do it with pure CSS.

They are using a listener and JQuery's $(document).scrollTop() to calculate where someone is scrolled to on the page, and if they are below a certain position, are adding a class to the <body> tag, which can then be used to reference CSS that fixes the navigation in position.

Post a Comment for "Positioning Nav Bar At The Bottom Of The Viewport Which Also Always Remains At The Bottom Of The Div"