Skip to content

Instantly share code, notes, and snippets.

@brettsnippets
Created June 29, 2013 06:38
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save brettsnippets/5890127 to your computer and use it in GitHub Desktop.
Save brettsnippets/5890127 to your computer and use it in GitHub Desktop.
Flexbox "Cross Browser" Sample
.content {
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox; /* TWEENER - IE 10 */
display: -webkit-flex; /* NEW - Chrome */
display: flex;
-webkit-flex-direction: column;
-moz-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-ms-box-orient: vertical;
box-orient: vertical;
width: 100%;
}
.main, .sidebar {
width: 100%;
}
.main {
-webkit-box-ordinal-group: 2;
-moz-box-ordinal-group: 2;
-ms-flex-order: 2;
-webkit-order: 2;
order: 2;
}
.sidebar {
-webkit-box-ordinal-group: 1;
-moz-box-ordinal-group: 1;
-ms-flex-order: 1;
-webkit-order: 1;
order: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment