Last active
April 12, 2024 02:55
-
-
Save avireni/9bab929dad9df2230393 to your computer and use it in GitHub Desktop.
CSS3 Flexbox
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel='stylesheet' href='styles.css'/> | |
</head> | |
<body> | |
<div class="flex-container"> | |
<div class="flex-item">Item 1</div> | |
<div class="flex-item">Item 2</div> | |
<div class="flex-item">Item 3</div> | |
<div class="flex-item">Item 4</div> | |
<div class="flex-item">Item 5</div> | |
<div class="flex-item">Item 6</div> | |
<div class="flex-item">Item 7</div> | |
<div class="flex-item">Item 8</div> | |
<div class="flex-item">Item 9</div> | |
</div> | |
</body> | |
</html> |
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
.flex-container{ | |
display: flex; | |
} | |
.flex-item{ | |
background-color: grey; | |
width: 100px; | |
height: 100px; | |
margin: 5px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment