Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style> 
#main {
  width: 220px;
  height: 300px;
  border: 1px solid black;
  display: flex;
  align-items: flex-start;
}
#main div {
  flex: 1;
}
#myBlueDiv {
  align-self: center;
}
</style>
</head>
<body>
<div id="main">
  <div style="background-color:coral;">RED</div>
  <div style="background-color:lightblue;" id="myBlueDiv">BLUE</div>  
  <div style="background-color:lightgreen;">Green div with more content.</div>
</div>
<p><b>Note:</b> The align-self property overrides the container's align-items property.</p>
</body>
</html>