title: How to fix an overlapping image in CSS?
body: <p>How do I fix if my image is overlapping a an area of my page? I have an image which should be a part of my navigation bar but what happen is that the image didn't show when I refreshed the page. I'm still learning css so please bear with me.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;nav class="navbar navbar-inverse"&gt;
      &lt;div class="container"&gt;
          &lt;div class="navbar-header"&gt;
              &lt;!-- Button for smallest screens --&gt;
              &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"&gt;&lt;span class="icon-bar"&gt;&lt;/span&gt;&lt;span class="icon-bar"&gt;&lt;/span&gt;&lt;span class="icon-bar"&gt;&lt;/span&gt;&lt;/button&gt;
              &lt;!--&lt;a class="navbar-brand" href="index.html"&gt;
              &lt;img src="assets/images/logo.png" alt="Techro HTML5 template"&gt;&lt;/a&gt;--&gt;
          &lt;/div&gt;
          &lt;div class="navbar-collapse collapse"&gt;
              &lt;ul class="nav navbar-nav pull-right"&gt;
                  &lt;li class="c1 active"&gt;&lt;a href="index.php"&gt;Home&lt;/a&gt;&lt;/li&gt;
                  &lt;li class="c1"&gt;&lt;a href="profile.php"&gt;Profile&lt;/a&gt;&lt;/li&gt;
                  &lt;li class="c1"&gt;&lt;a href="games.php"&gt;Games&lt;/a&gt;&lt;/li&gt;
                  &lt;li class="c1"&gt;&lt;a href="#"&gt;Top Players&lt;/a&gt;&lt;/li&gt;                     
                  &lt;li class="c1"&gt;&lt;a href="about.php"&gt;About&lt;/a&gt;&lt;/li&gt;                   
                  &lt;li class="c1 dropdown"&gt;
                      &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;Settings &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
                      &lt;ul class="dropdown-menu"&gt;
                          &lt;li&gt;&lt;a data-toggle="modal" data-target='#change'&gt;Change Password&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="../logout.php"&gt;Logout&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
          &lt;!--/.nav-collapse --&gt;
      &lt;/div&gt;
  
      &lt;!--MODAL--&gt;
          &lt;?php include("includes/changepass.php");?&gt;
      &lt;!--END MODAL--&gt;
  
  &lt;/nav&gt;
  
  &lt;nav class="nav-top"&gt;&lt;/nav&gt;
  </code></pre>
  
  <p><strong>CSS</strong></p>
  
  <pre><code>.navbar-inverse {
    background: #ff4e50;  
    margin: 0 auto; 
    border: none;
    z-index: -1;
  }
  .nav-top{
    background-image: url(../images/header-top.png);
    margin-bottom: 40px;
    padding-bottom: 20px;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 1;
  }
  </code></pre>
  
  <p><strong>What It looks now</strong></p>
  
  <p><a href="https://i.stack.imgur.com/y4MvE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y4MvE.png" alt="enter image description here"></a></p>
  
  <p><strong>The Image</strong></p>
  
  <p><a href="https://i.stack.imgur.com/21g76.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/21g76.png" alt="enter image description here"></a></p>
  
  <p><strong>My Plan</strong></p>
  
  <p><a href="https://i.stack.imgur.com/UpwWW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UpwWW.png" alt="enter image description here"></a></p>