title: Text overlapping navigation bar when resizing browser window
body: <p>I'm trying to create my first webpage for my portfolio but my text keeps overlapping the navigation bar on the left and I don't know why! I have tried different methods but nothing has worked so far and I just don't understand what seems to be the problem! I'm new to HTML and CSS so I'm probably doing something wrong without realising it :)</p>
  
  <p>This is my code:</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-css lang-css prettyprint-override"><code>/* Heading Styles -----------------------*/
  
  .main-header {
    padding-top: 0x;
    height: 250px;
    text-align: right;
  }
  
  #background-image {
    background: url("../banner/pilved.jpg") no-repeat center;
    background-size: cover;
  }
  
  
  /*Welcome to text------------------------------------*/
  
  .first-line-title {
    font-size: 35px;
    color: white;
    font-weight: normal;
    font-style: italic;
    position: fixed;
    top: 30%;
    right: 35%;
  }
  
  
  /* AvesDEsign's portfolio text---------------------*/
  
  .second-line-title {
    font-size: 90px;
    color: white;
    font-weight: normal;
    line-weight: 1.3;
    position: absolute;
    overflow: hidden;
    top: 40%;
    right: 8%;
  }
  
  
  /* Navigation bar -------------------------*/
  
  * {
    margin: 0;
    padding: 0;
    font-family: Avenir;
  }
  
  nav {
    width: 250px;
    height: 600px;
    background-color: rgba(0, 0, 0, 0.2);
    line-height: 80px;
    text-align: center;
  }
  
  nav ul {
    float: left;
    margin-left: 45px;
    margin-top: -5px;
  }
  
  nav ul li {
    list-style-type: none;
    transition: 0.8s all;
    font-family: Avenir;
  }
  
  nav ul li:hover {
    background-color: #d0d6da;
  }
  
  nav ul li a {
    text-decoration: none;
    color: white;
    padding: 30px;
  }
  
  
  /* Logo information------------------------------*/
  
  .logo {
    margin-left: -8px;
    margin-top: 40px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  
  &lt;head&gt;
    &lt;title&gt;AvesDesign&lt;/title&gt;
    &lt;link rel="stylesheet" href="css/style.css"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div id="background-image"&gt;
      &lt;nav&gt;
        &lt;img class="logo" src="Logo/AvesDesignlogo.png" width="140" height="170" alt="AvesDesignlogo"&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;HOME&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;PORTFOLIO&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;EXPERIENCE&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;CONTACT&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/nav&gt;
  
      &lt;header class="main-header"&gt;
        &lt;div class="first-line-title"&gt;Welcome to&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="second-line-title"&gt;AvesDesign's portfolio
      &lt;/h1&gt;
  
    &lt;/div&gt;
    &lt;/header&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>