html - cannot align flexbox properly with justify-content -


i attempting create container has 2 divs on top , each side, , content @ bottom. have done flexbox. can align bottom content want, top content, aligns top, not left , right. thought using

justify-content: space-between; 

would dot it. have tried putting .social div margin-left: auto;

this code:

.boxes {    background-size: cover;    background-position: center center;    display: flex;    align-items: flex-end;    background-color: red;    width: 50%;  }    .branding {    display: flex;    align-items: flex-start;    justify-content: space-between;    height: 200px;  }
<div class="boxes">    <div class="branding">      <div class="logo">logo</div>      <div class="social">social</div>    </div>    <div>      <h2>case study title</h2>      <p>a catchy description our case study. worked hard.</p>    </div>  </div>

what have missed out here?

-thanks

i think need make boxes flex direction column:

.boxes {    background-size: cover;    background-position: center center;    display: flex;    flex-direction:column;     /* add */    background-color: red;    width: 50%;  }    .branding {    width:100%;    display: flex;    flex-direction:row;    justify-content: space-between;    height: 200px;                  /* seems cause big vertical gap isn't in original */  }
<div class="boxes">    <div class="branding">      <div class="logo">logo</div>      <div class="social">social</div>    </div>    <div>      <h2>case study title</h2>      <p>a catchy description our case study. worked hard.</p>    </div>  </div>


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -