1

I see that HTML5 supports the <footer> tag. But I am using XHTML 1.0 and this tag is not supported.

Is there any other way that I can implement a footer? Ideally it would only show when in print mode, and at the bottom of every page.

I have tried to find an alternative to the footer tag. But to no avail.

Thank you.

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164

1 Answers1

2

Use div tag with class footer and define different css for media print and screen.

@media screen {
  .footer { visibility: hidden; }
}
@media print {
  .footer { visibility: visible; }
}
Ance
  • 146
  • 8
  • How would you define such a footer to render at bottom of page? – Andrew Truckle Mar 20 '16 at 21:26
  • 1
    Do you mean that the div element must always be glued to the bottom of the page, or that it must be the last element on the layout? If the first one, you may set the position to fixed and adjust the bottom property to 0 with css. – Ance Mar 21 '16 at 07:14