title: Right Align Logo Above Text Using Flex
body: <p>I am trying to Align 1 of 2 Items above the other while using flex. I have a .section which displays:flex - .main-body which defines the width of the container and then .logo &amp; .content within that. I am not sure where I am messing it up but I am trying to right align .logo over .content (or the smiley in my example below). By using display:flex in .section, I was able to center a container (.main-body) and keep all items within that container set to a specific width- however, when I try to align .logo to the right by using justify-content or any other flex property, there are no changes to the logo's position. </p>
  
  <p>I have found a make shift solution in using "margin-left: XXXpx;" on .logo but that pushes the div container .logo over so that I then get a horizontal scroll.</p>
  
  <p><strong>EDIT:</strong> Sorry I think I wasn't very clear (its getting late!). The code snippet below <strong>in full screen</strong> shows the goal and what I am looking to do without having to use <code>.logo {margin-left: 500px;}</code> to achieve the result. Without the margin-left property, the face is left aligned above the text. Basically I am wondering how I can set this up so it is right aligned above the text utilizing flex.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;head&gt;    
  &lt;style&gt;
  * {
    margin: 0;
    padding: 0;
  }
  
  .container { 
      background: white fixed; 
      -webkit-background-size: cover;
      -moz-background-size: cover;
      -o-background-size: cover;
      background-size: cover; 
      width: 100%;
      height: 100vh;
  }
  
  .section {
      height: 100vh;
      width:100%;
      display: flex;           
      justify-content: center; 
      align-items: center;   
  }
  
  .main-body {
      width: 736px;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: flex-start;
  }
  
  .logo {
      background: url('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTx0S56P8lrzrjb-7aJX3QG_feOPux89cnLLXF_UJ49tHAys99ccw') no-repeat;
      height: 205px;
      width: 240px;
      display: flex;
      justify-content: right;
      align-self: flex-end;
  }
  
  .content {
    font-size: 45px;
    margin-bottom: 20px;
  }
  
  .lorem {
    font-size: 18px;
  }  
  &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div class="container"&gt;
              &lt;div class="section"&gt;
                  &lt;div class="main-body"&gt;
                      &lt;div class="logo"&gt;&lt;/div&gt;
                      &lt;div class="content"&gt;
                          &lt;h1&gt;Right Align Smiley&lt;/h1&gt;
                      &lt;/div&gt;
                      &lt;div class="lorem"&gt;
                          &lt;p&gt;"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo."&lt;/p&gt;                    
                      &lt;/div&gt;
              &lt;/div&gt;           
      &lt;/div&gt;       
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I made up this example in codepen to show the structure and what I am trying to accomplish but without having to rely on "margin-left" within .logo, How can I accomplish this by using the flex?</p>