Skip to content

header overlapping page content on second page #3454

Closed Answered by bsweeney
Anishaaaaaaaaaaa asked this question in Q&A
Discussion options

You must be logged in to vote

You add the necessary margin to the body (page):

@page { margin-top: 100px; }

then position the header into that space using negative coordinates:

#header { position: fixed; top: -100px; left: -100px; right: -100px; height: 75px; background-color: blue; }

Actually, it looks like you're already attempting to position the header into the margin with top: -20px, but that's not enough to fully encompass the header since the content has a height of 50px.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Anishaaaaaaaaaaa
Comment options

@bsweeney
Comment options

@Anishaaaaaaaaaaa
Comment options

@bsweeney
Comment options

Answer selected by Anishaaaaaaaaaaa
@Anishaaaaaaaaaaa
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants