Position: Absolute


#1

I am working on Exercise 4: Position Absolute. I have passed the exercise and the code reader is saying that my inputs were all correct. However, the header will not follow as I scroll down the page. Here is my code for header:

header {
background-color: #466995;
border-bottom: 1px solid #466995;
position: absolute;
width: 100%;
}

Any idea what is going on?


#2

Please post a link to the exercise page. Thanks.


#3

https://www.codecademy.com/courses/learn-css-display-positioning/lessons/css-display-positioning/exercises/css-position-fixed?action=resume_content_item&course_redirect=learn-css


#4

Sorry, it seems I misunderstood the function of absolute vs fixed. I think I see that now.


#5

That’s for the next lesson, (no. 5) which swaps out absolute and replaces it with fixed.


#6

Thanks Roy! I didn’t pay close enough attention.