Make the HTML version adapt to small viewports

Additional styles taken from <http://javascript.spec.whatwg.org/>.