Excercise 4, Position: Absolute, Instruction 2-Add offset properties


1. In style.css, set the position inside of the .header selector to absolute. Scroll up and down the web page. What do you notice?

  1. Next, add a top and left offset properties and set them to 0 pixels.

Problem: Adding the top and left offset properties does not change the way the element behaves. It still stays on top of the other elements when I scroll down. Is there something wrong with my code?

.header {
  background-color: #466995;
  border-bottom: 1px solid #466995;
  overflow-y: auto;
  width: 100%;
  position: fixed;
  top: 0px;
  left: 0px;


The position property should read
position: absolute;
I copied it after moving to the next exercise.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.