This course will be retired on July 12, 2021. We recommend "Mobile-First CSS Layout" for up-to-date content.
Fixed Positioning4:34 with Guil Hernandez
Fixed positioning is a form of absolute positioning that positions elements in relation to the browser window instead of its containing element. In this video, you'll learn how to add a fixed navigation to your website.
- Unlike absolute positioning, an element with fixed positioning stays fixed to one spot on the page, regardless of the size of the browser window.
- Fixed headers and navigation bars are common in web design. For example, the navigation bar on Twitter.
- Fixed positioning is always relative to the browser's viewport. Like absolute positioning, you determine the fixed spot using offset values.
- When you use relative, absolute or fixed positioning on elements, you may end up with several elements occupying the same space. This can make elements overlap or completely cover up other elements from view.
You need to sign up for Treehouse in order to download course files.Sign up