I have an html <footer>
element that I'm trying to make act like a footer in a word document. In other words, the footer needs to be positioned at the bottom of the page. Is there a way to use the CSS @media print
to move the footer to the bottom of that particular page? Also, the space the footer has to move can vary from page to page. Is there a way to restrict that element from moving farther than a certain distance?
MY CODE
footer p {
color: green;
text-align: center;
font-size: 11px;
display: none;
}
footer div {
color: green;
border: 1px solid green;
display: none;
}
@media print {
footer p {
display: block !important;
position: fixed;
bottom: 0;
}
footer div {
display: block !important;
position: fixed;
bottom: 0;
}
}
The div
is not visible on any of the pages and the p
is only visible on the first page.