0

I have 3 divs

.container {
width: 100%;
display: flex;
flex-flow: row;
align-items: center;
}

.left {
  width: 200px;
}

.right {
  width: 400px;
}

.middle {
  flex-grow: 1;
}

html :

<div class="container">
  <div class="left"/>
  <div class="middle"/>
  <div class="right"/>
</div>

I want the middle div to always be centered relative to the container no matter the width changes of left or right divs. Apparently, my main concern is that I need a centered div, and have other divs left or right that do not mess up the position of the center div.

but-why
  • 533
  • 3
  • 10

0 Answers0