![]() |
VOOZH | about |
Foundation CSS is a free and open-source front-end framework that aids in the creation of flexible web designs. It's one of the most powerful CSS frameworks, and it works across all devices, delivering a responsive grid as well as HTML and CSS UI components, templates, and more. It also includes some optional JavaScript Extensions features. Because of the inclusion of the Fastclick.js utility, it also delivers quick rendering on mobile devices.
The Navigation Bar is the way to add a way to have links in a horizontal orientation which helps us to navigate between different locations on the webpage. Generally, a navigation bar is at the top, but in some design layouts, they are kept on the left and right or even at the bottom of the line.
Foundation CSS Sticky Navigation can be utilized by adding the .sticky class to the navigation bar, which will enable us to add a sticky navbar. The navigation bar is encased in a sticky container in this case. Here a sticky navbar is created by adding a data-sticky attribute to the .title-bar class.
Foundation CSS Navigation Bar Classes:
Foundation CSS Navigation Bar Attributes:
Syntax:
<div data-sticky-container> <div class="title-bar" data-sticky data-options="marginTop:0;"> <div class="title-bar-left"> Content </div> <div class="title-bar-right"> Content </div> </div> </div>
Example: This example demonstrates a sticky navigation bar on a webpage using Foundation CSS.
Output:
Reference: https://get.foundation/sites/docs/sticky.html#sticky-navigation