html - how to not let other div overlap my nav bar -


i cant seem figure out how overlap nav bar on full display when scrolling. code given below. please me lost few days. i've fixed navagation bar using position:fixed. dont know whether position of div element wrong or there should ve known earlier before making fixed navigation bar.

`

body{    background-image:url('https://www.pixelstalk.net/wp-content/uploads/2016/04/blue-icy-ocean-wallpaper-hd.jpg');        }  *{    padding:0px;    margin:0px;  }  #maindiv{    width:100%;    height:100px;  }    #navdiv ul{    width:100%;    height:80px;     background-color:#000916;    line-height:80px;      position:fixed;  }  #navdiv ul li{    list-style-type:none;    display:inline-block;    float: right;  }  #navdiv ul a{    text-decoration:none;    color:white;    padding:20px;  }  #navdiv ul a:hover{    background:#000948;    transition: 0.40s;  }  #navdiv h1{    color:white;    float:left;    width:200px;    margin-left:20px;    margin-top:10px;    cursor:pointer;  }  #about{    width:50%;    margin:auto;    background-color:#000916;    border-radius:30px;;  }  #about p{    color:white;  }  #left-text1{    padding-left:10px;    padding-top:10px;  }  .resize{    width:400px;    height:auto;    border-radius:30px;  }
<head>    <title>portfolio</title>  </head>  <body>    <div id="maindiv">        <div id = "navdiv">          <ul>            <h1>danial</h1>            <li><a href="#" id="linkref">contact</a></li>            <li><a href="#" id="linkref">portfolio</a></li>            <li><a href="#" id="linkref">about</a></li>            <li><a href="#" id="linkref">home</a></li>          </ul>        </div>    </div>    <div id="about">      <div class="row">        <div class="col-md-6">          <p id="left-text1">welcome site<br>i front-end web developer loves cooperate , involve in projects either earned money or earned experience</p>               </div>        <div class="col-md-6">          <img class="resize"src="https://www.123freevectors.com/wp-content/uploads/digi/casual-man-standing-free-vector-17.jpg">        </div>      </div>    </div>  </body>        

`

body{    background-image:url('https://www.pixelstalk.net/wp-content/uploads/2016/04/blue-icy-ocean-wallpaper-hd.jpg');        }  *{    padding:0px;    margin:0px;  }  #maindiv{    width:100%;    height:100px;  }    #navdiv ul{    width:100%;    height:80px;     background-color:#000916;    line-height:80px;      position:fixed;    /* can set want infront z-index prop */    z-index:99999;  }  #navdiv ul li{    list-style-type:none;    display:inline-block;    float: right;  }  #navdiv ul a{    text-decoration:none;    color:white;    padding:20px;  }  #navdiv ul a:hover{    background:#000948;    transition: 0.40s;  }  #navdiv h1{    color:white;    float:left;    width:200px;    margin-left:20px;    margin-top:10px;    cursor:pointer;  }  #about{    width:50%;    margin:auto;    background-color:#000916;    border-radius:30px;;  }  #about p{    color:white;  }  #left-text1{    padding-left:10px;    padding-top:10px;  }  .resize{    width:400px;    height:auto;    border-radius:30px;  }
<head>    <title>portfolio</title>  </head>  <body>    <div id="maindiv">        <div id = "navdiv">          <ul>            <h1>danial</h1>            <li><a href="#" id="linkref">contact</a></li>            <li><a href="#" id="linkref">portfolio</a></li>            <li><a href="#" id="linkref">about</a></li>            <li><a href="#" id="linkref">home</a></li>          </ul>        </div>    </div>    <div id="about">      <div class="row">        <div class="col-md-6">          <p id="left-text1">welcome site<br>i front-end web developer loves cooperate , involve in projects either earned money or earned experience</p>               </div>        <div class="col-md-6">          <img class="resize"src="https://www.123freevectors.com/wp-content/uploads/digi/casual-man-standing-free-vector-17.jpg">        </div>      </div>    </div>  </body>        


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -