Skip to main content

Command Palette

Search for a command to run...

How to Arrange two div side by side using Flexbox ?

Updated
1 min read
S

I love learning about technology and sharing that with others

Hey everyone welcome back to the blopost.

Today we will arrange two div side by side

so for this we will have one parent div and two child div inside that

HTML

<div class="flex-container">

  <div class="flex-child child1">
    Flex Column 1
  </div>

  <div class="flex-child child2">
    Flex Column 2
  </div>

</div>

CSS

.flex-container {
    display: flex;
}

.flex-child {
    flex: 1;

}

More from this blog

H

hashcodehub

271 posts

Consistent, Passionate and Organized :)