Challenge: Work with 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:
- Apply
fixedpositioning to the navigation list. - Choose one property for horizontal displacement (
leftorright). - Choose one property for vertical displacement (
toporbottom). - Test the functionality by clicking on different links and ensuring that the page scrolls while keeping the navigation bar visible.
index.html
index.css
- Set the
topproperty to0to keep the navigation at the top of the web page. - For horizontal positioning, you can use either
left: 0;to align it with the viewport's left edge orright: 0;to align it with the right edge.
index.html
index.css
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 7
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 2.08
Challenge: Work with Fixed Positioning
Swipe to show menu
Task
Create a website navigation bar that remains fixed at the top of the webpage for users to access at all times. Steps:
- Apply
fixedpositioning to the navigation list. - Choose one property for horizontal displacement (
leftorright). - Choose one property for vertical displacement (
toporbottom). - Test the functionality by clicking on different links and ensuring that the page scrolls while keeping the navigation bar visible.
index.html
index.css
- Set the
topproperty to0to keep the navigation at the top of the web page. - For horizontal positioning, you can use either
left: 0;to align it with the viewport's left edge orright: 0;to align it with the right edge.
index.html
index.css
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 7