title: Cannot fit image to navigation bar
body: <p>I'm trying to add an image to my navigation bar, and fit the image to the navigation bar, however I could not manage to resize the image for this purpose; no matter what I did the image just extends to the whole page. I am quite new to HTML &amp; CSS, could you please explain how to fit the image to the navigation bar?</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>#profile-image {
    height: auto;
    width: auto;
    float: left;
    padding-left: 2%;
    margin: 0 auto;
    padding: 10px 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="top-padding"&gt;
    &lt;nav&gt;
      &lt;div id="profile-image"&gt;&lt;img src="profile-image.jpg"&gt;&lt;/div&gt;
      &lt;ul class="menu"&gt;
        &lt;li&gt;&lt;a href="#" class="current"&gt;About Me!&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="blogpage.html" title="Blogs!"&gt;My Blog Posts!&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="projectpage.html" title="Projects!"&gt;My Projects!&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/nav&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>