HTML Column Rearrangement with CSS -
i have website picture column on left side, , navigation column on right side , flexible width central column content.
edit: these columns divs
current:
---------------------------------------------------- | | | | | column left | centre column | column right | | (305px) | | (250px) | ---------------------------------------------------- the left , right columns have fixed widths , centre column fills space.
what trying find out how make layout rearrange mobile viewing on taller narrow devices, intend (due relative narrowness of left , right columns) rearrange on css widths of less ~850px, layout becomes:
intended:
---------------------------------- | | | | column left | column right | | (305px) | (250px) | ---------------------------------- | | | centre column | | (100%) | ---------------------------------- centred in screen space.
(and on narrow screens further stacked as:
---------- | left | ---------- | centre | ---------- | right | ---------- )
currently left , right columns floats around centre, asking how can (or should) approach media specific css rules turn left , right floats appear above?
i if possible without changing html on page (there many pages work on). can't use flexbox needs backward compatible possible.
there many answers on can't find them, maybe due searching wrong descriptions, terminology, etc. answers have found seem based on columns being static known width, whereas central column filler width of (100% - left column - right column).
edits/clarifiers:
i using media queries asking question of can put in media queries desired results.
due reading ie10 has issues
flexbox, long paragraphs (and other minor issues too) cautious using flexbox.the current layout uses html div elements. no tables.
the centre column text heavy , of variable width, other 2 columns static widths (left:305, right:250) , theses can not change.
to that, need media queries in css:
@media (max-width: 900px) { .left,.right { display: inline-block; width: 50%; } .centre { display: block; width: 100%; clear: both; } } @media (max-width: 600px) { .left,.right, .centre{ display: block; width: 100%; clear: both; } } this <900 pixels left , right , down centre. <600 pixels vertical
Comments
Post a Comment