Created
December 1, 2020 19:11
-
-
Save ghostdevv/070108208c1479be7b9e1bb9410025de to your computer and use it in GitHub Desktop.
Flexbox corners (Some positioning with absolute)
This file contains 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
*, *::before, *::after { box-sizing: border-box; } | |
.flexbox-corners { | |
background-color: DarkCyan; | |
width: 100%; | |
height: 100%; | |
display: flex; | |
justify-content:space-between; | |
position: relative; | |
} | |
.flexbox-corners > div { | |
width: 50px; | |
height: 50px; | |
background-color: DarkGray; | |
display: grid; | |
place-items: center; | |
} | |
.flexbox-corners > div:nth-child(2) { | |
align-self: flex-end; | |
position: absolute; | |
bottom: 0; | |
left: 0; | |
} | |
.flexbox-corners > div:nth-child(3) { | |
align-self: flex-end; | |
position: absolute; | |
bottom: 0; | |
right: 0; | |
} |
This file contains 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
<div class="flexbox-corners"> | |
<div> | |
<p>1</p> | |
</div> | |
<div> | |
<p>2</p> | |
</div> | |
<div> | |
<p>3</p> | |
</div> | |
<div> | |
<p>4</p> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment