Static
Static is the default position, where elements sit in the normal flow of the page and top and left don't move them.
Apprentice · CSS · Updated
After this lesson you can
- Explain how the default static position lays out elements, and why top and left don't move them
Key takeaways
- The CSS position property has five values, static, relative, absolute, fixed and sticky, and static is the default.
- A static element sits in the normal flow of the page. Block elements, such as a div, each take their own line.
- The top and left properties have no effect on a static element, and it scrolls with the rest of the page.
The CSS position property places an element in one of five ways: static, relative, absolute, fixed or sticky.
static is the default positioning used when a browser lays out the page, in what's called the normal flow. Block elements, such as a div, each start on their own line and take up the space of their own height, and the next element is placed on the line below. The left and top properties have no effect on a static element. The offsets top, right, bottom and left only work on a positioned element, one whose position is anything other than static.
.div-2 {
/* no position is set, so it's static */
left: 30px;
top: 30px;
}

As the page is scrolled, all elements scroll together.

Do it: put the notice and the footer back in the flow
You copied a theme for your reading list page, and two of its rules pull elements out of the normal flow: the sale notice and the footer both jump to the page's top left corner and lie on top of the heading. The theme is in the box's given CSS, and your CSS comes after it, so your rules win.
Here is each element, where it is now, and where it should be:
| Element | Now | Should be |
|---|---|---|
the sale notice, class notice |
out of the flow, over the heading | in the normal flow, first on the page |
the footer, the <footer> element |
out of the flow, over the heading | in the normal flow, last on the page |
the Ask a librarian link, class ask |
fixed in the window's bottom right corner | stays as it is |
Your job: write CSS that puts the notice and the footer back in the normal flow.
- Give the notice and the footer the default position, the one every element starts with.
- Don't write
toporleftin your CSS: once they're back in the normal flow,topandleftdo nothing. - Don't change the Ask a librarian link.
Practiced live on the lesson page: write the CSS right there and check it.
Check yourself
2 questions to try on the lesson page.
So what
Every element starts out static, so the normal flow is the baseline: each of the other four position values is a change to it.