title: Aligning divs in a header
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.header {
   background-color: yellow;
   font-family: 'Arial';
   display: inline-block;
  }
  
  .leftheader{
   float: left;
  }
  
  #Logo{
   font-size: 40px;
   font-weight: 700;
   display: inline-block;
  }
  
  #LogoLTD{
   font-size: 20px;
   display: inline-block;
  }
  
  .rightheader{
   display: flex;
   float: right;
  }
  
  .rightheader a{
   color: black;
   font-size: 20px;
   font-weight: 700;
   text-decoration: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;section class="header"&gt;
  
   &lt;div class="leftheader"&gt;
     &lt;div id="Logo"&gt;COMPANY NAME&lt;/div&gt;
     &lt;div id="LogoLTD"&gt;LIMITED&lt;/div&gt;
    &lt;/div&gt;
  
   &lt;div class="rightheader"&gt;
       &lt;a href="/home.html"&gt;HOME&lt;/a&gt;
       &lt;a href="/who.html"&gt;WHO&lt;/a&gt;
       &lt;a href="/contact.html"&gt;CONTACT&lt;/a&gt;
   &lt;/div&gt;
  
  &lt;/section&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have been trying to make a header for my site but I can't get the aligning right.</p>
  
  <p>I want to have my links on the right of the page inside the yellow box.</p>
  
  <p>The yellow colour should be inside the header class.</p>
  
  <p>Then the leftheader div and the rightheader div should be inside the header class. And they should be positioned on the left and right but I cannot get this to work whatever I do :(</p>
  
  <p>My HTML is:</p>
  
  <pre><code>&lt;section class="header"&gt;
  
   &lt;div class="leftheader"&gt;
     &lt;div id="Logo"&gt;COMPANY NAME&lt;/div&gt;
     &lt;div id="LogoLTD"&gt;LIMITED&lt;/div&gt;
    &lt;/div&gt;
  
   &lt;div class="rightheader"&gt;
       &lt;a href="/home.html"&gt;HOME&lt;/a&gt;
       &lt;a href="/who.html"&gt;WHO&lt;/a&gt;
       &lt;a href="/contact.html"&gt;CONTACT&lt;/a&gt;
   &lt;/div&gt;
  
  &lt;/section&gt;
  </code></pre>
  
  <p>My CSS is:</p>
  
  <pre><code>.header {
   background-color: yellow;
   font-family: 'Arial';
   display: inline-block;
  }
  
  .leftheader{
   float: left;
  }
  
  #Logo{
   font-size: 40px;
   font-weight: 700;
   display: inline-block;
  }
  
  #LogoLTD{
   font-size: 20px;
   display: inline-block;
  }
  
  .rightheader{
   display: flex;
   float: right;
  }
  
  .rightheader a{
   color: black;
   font-size: 20px;
   font-weight: 700;
   text-decoration: none;
  }
  </code></pre>