Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Fixed Positioning | Item Positioning
Advanced CSS Techniques
course content

Course Content

Advanced CSS Techniques

Advanced CSS Techniques

1. Introduction
2. Item Positioning
3. Transitions
4. Animations
5. Transformations
6. Adaptive/responsive websites and apps
7. Preprocessors

bookChallenge: Fixed Positioning

Task

Create a website navigation bar that remains fixed at the top of the webpage for users to access at all times. Steps:

  1. Apply fixed positioning to the navigation list.
  2. Choose one property for horizontal displacement (left or right).
  3. Choose one property for vertical displacement (top or bottom).
  4. Test the functionality by clicking on different links and ensuring that the page scrolls while keeping the navigation bar visible.
html

index

css

index

js

index

copy
  1. Set the top property to 0 to keep the navigation at the top of the web page.
  2. For horizontal positioning, you can use either left: 0; to align it with the viewport's left edge or right: 0; to align it with the right edge.
html

index

css

index

js

index

copy

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 2. Chapter 7
some-alt