by alok-g · 13y ago · 0 comments
Why do responsive themes/websites often collapse the top navigation bar into a menu button a lot before the space available becomes too short to hold it?
It sounds to me that the default action with both Bootstrap and Zurb is to stack the columns when the width is smaller, or possibly make them disappear completely. Is my understanding correct? If so, is this behavior customizable? Could one for example make a right column come on top instead of the bottom when the columns are stacked?
The behavior to hide something is of course customizable. Bootstrap comes with certain classes [0] which can hide the content on mobile screens and show on desktop.
The link above does suggest why the navigation bars collapse too soon sometimes (and sometimes too late). The collapse event is tied to the horizontal resolutions at 768, 992 and 1200 px, and does not depend on how much width the navigation bar actually needs (such that it is collapsed only when space available for it is too small).
I wonder why things are built this way though.
In terms of navigation, it is tied to resolution because it's easier to change code than to change devices owned by your users :)