format header and footer to work on mobile