how to make the header and footer fixed - so they don't scroll

how do I fix it so that the header and footer don't scroll? they take up too much of the screen space esp on mobile and I would like to make them fixed in place.

additionally I keep haveing ​ show up randomly. how can I prevent that from happening?