Content that appears behind a fixed heading

I fixed the heading section of the website, but the first div of the page appears behind the heading; instead of starting at the end of the title.

+5
source share
1 answer

When you apply position: fixedor position: absolute, an element is removed from the document flow, so the elements that appear after that consider it as non-existent. That's why your divjumps up. To fix this, apply margin-topthat is equal to your header height - http://jsfiddle.net/2xjES/

+8
source

All Articles