1

I am trying to achieve equal width for flex column using css. One way to achieve is using bootstrap grid like below

<div class="row">
   <div class="col-lg-6"> I am left side of div covering 50%</div>
   <div class="col-lg-6"> I am right side of div covering 50%</div>
</div>

But When I am using display flex property my div are covering the content width and not full width with equal width. I am struggling to achieve it. Any help will be appreciated.

<div class="parent">
<div class="child">Left Div</div>
<div class="child">Right div but long content and testing the long content</div>
</div>

<style>
.parent {
display:flex;
flex: 1; // not working
}
</style>
tyler
  • 418
  • 4
  • 14

0 Answers0