Fix search form layout at small to medium screen sizes. Closes #827