Last active
June 12, 2019 18:00
-
-
Save oterox/555da3f952862896e3dd6d3e5a171fcb to your computer and use it in GitHub Desktop.
Flex 2 columns
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
<body> | |
<div class="row"> | |
<div id="left" class="column"> | |
LEFT | |
</div> | |
<div id="right" class="column"> | |
RIGHT | |
</div> | |
</div> | |
</body> |
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
body,html { | |
height: 100%; | |
padding: 0; | |
margin:0; | |
} | |
#left { | |
background-color: #bebebe; | |
flex-basis: 55%; | |
} | |
#right { | |
background-color: #cecece; | |
flex-basis: 45%; | |
} | |
.row { | |
height:100%; | |
display: flex; | |
flex-direction: row; | |
flex-wrap: wrap; | |
width: 100%; | |
} | |
.column { | |
display: flex; | |
flex-direction: column; | |
flex: 1; | |
align-items: center; | |
justify-content: center; | |
} | |
@media screen and (max-width: 992px){ | |
.column { | |
flex-basis: 100% !important; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment