I have a single page application built with Twitter Bootstrap
. My application has several modal dialogs, which normally take 70% of the page width and are centered horizontally. My page and modal setup is like this:
I have placed a row with columns inside the modal. When I resize the page, the columns take the col-sm-6
style really late, since the col-md-*
and col-sm-*
depend on the window size and not on the size of the surrounding container, as I understand it. So although my page is e.g. still 1200px wide, my modal is only 840px wide and therefore would require the columns to use the col-sm-*
classes.
Is there a way to tell Bootstrap to apply the classes based on the size of the container rather than on the windows size?