Created
April 11, 2022 10:54
-
-
Save malkab/ada3c67212085320ec7f16548e760fa9 to your computer and use it in GitHub Desktop.
CSS side-by-side DIV
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.grid-container { | |
display: grid; | |
grid-template-columns: 1fr 1fr; | |
grid-gap: 20px; | |
} |
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="grid-container"> | |
<div> | |
<p>Left column (equal distribution, see 1fr at CSS)</p> | |
</div> | |
<div> | |
<p>Right column</p> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment