Created
September 4, 2017 21:04
-
-
Save jomoespe/98038d4fb605238c43f9e31a36cda4cf to your computer and use it in GitHub Desktop.
A simple example of flex layout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<style type="text/css"> | |
* { | |
margin: 0; | |
padding: 0; | |
font-size: 10px; | |
} | |
div { | |
display: flex; | |
flex-direction: row; | |
flex-wrap: nowrap; | |
align-items: center; | |
align-content: center; | |
height: 5rem; | |
border: solid 1px lightgray; | |
} | |
div section { | |
flex-grow: 1; | |
border: solid 1px gray; | |
} | |
</style> | |
<div> | |
<section>Section 1</section> | |
<section>Section 2</section> | |
<section>Section 3</section> | |
</div> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment