Flexbox Practice HTML, CSS

talha_khan74

Talha Shinwari

Posted on December 10, 2021

Flexbox Practice HTML, CSS

HTML

<body>

        <div class="container">
        <div class="flex">ONE</div>
        <div class="flex">TWO</div>
        <div class="flex">THREE</div>
        <div class="flex">FOUR</div>
        <div class="flex">FIVE</div>
        <div class="flex">SIX</div>
        <div class="flex">SEVEN</div>
        <div class="flex">EIGHT</div>
    </div>

</body>
Enter fullscreen mode Exit fullscreen mode

CSS

.container{
    display: flex;
    flex-wrap: wrap;
    background-color: darkmagenta;
    justify-content: flex-start;

}

.flex{
    display: flex;
    width: 200px;
    height: 200px;
    margin: 10px;
    border: 2px solid black;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: yellow;
    justify-content: center; 
    align-items: center; 
   font-size: large;
   font-weight: 1000;
}

Enter fullscreen mode Exit fullscreen mode

💖 💪 🙅 🚩
talha_khan74
Talha Shinwari

Posted on December 10, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Subgrid
undefined Subgrid

November 29, 2024

#CodePenChallenge: Wall of Text
codepen #CodePenChallenge: Wall of Text

November 29, 2024

Body fluids & circulation Task
codepen Body fluids & circulation Task

November 28, 2024

Flip Card on Hover in CSS
codepen Flip Card on Hover in CSS

November 27, 2024

Backlight in CSS
codepen Backlight in CSS

November 27, 2024