html - Preventing main div from scrolling underneath Header -


i have problem "main" div holds content of webpage scrolls under header , nav bar. i've been looking around solutions , people position: fixed position: absolute. however, when try these div still scrolls under header , nav bar. i've tried set top: 980px; account pixel size of these 2 elements , still scroll.

@import url(http://fonts.googleapis.com/css?family=pacifico);   body {    background-image: url("paws1.jpg");    font-family: "helveticaneue-light", "helvetica neue light", "helvetica neue", helvetica, arial, "lucida grande", sans-serif;    font-weight: 300;  }  /*   header elements   */    img {    display: block;  }  header {    width: 950px;    margin: 0 auto;    height: 250px;    position: fixed;    background-color: rgba(144, 214, 32, 1);    min-width: 950px;    z-index: 1;    top: 0px;  }  header div {    display: inline-block;  }  #nav {    width: 950px;    content: "";    margin: 0 auto;    display: block;    height: 30px;    line-height: 0;    position: fixed;    min-width: 950px;    background: #8bc43f;    text-align: center;  }  #account {    position: relative;    float: right;    padding-top: 22px;  }  header ul {    padding-left: 20px;  }  header li {    display: inline-block;  }  header li {    color: white;    text-decoration: none;    padding: 5px;  }  header li a:hover {    background: #571173;    border-radius: 3px;  }  #current {    background-color: rgba(255, 102, 0, 1);    border-radius: 3px;    z-index: 2;  }  /*  main content  */    #main {    background: rgba(255, 255, 255, 1);    width: 950px;    margin: 0px auto;    min-width: 950px;    overflow-x: auto;    top: 980px;  }  li {    list-style-type: none;    margin-left: 20px;    margin-right: 20px;  }  #splash-left {    float: left;    width: 590px;  }  #splash-right {    float: right;    width: 300px;    padding-top: 50px;    padding-left: 10px;  }  #home-image {    background: url(../images/mainimage.jpg);    border-radius: 0px;    width: 900px;    margin: 0 auto;    margin-top: 280px;    text-align: center;  }  .splash-title {    font-family: 'pacifico', cursive;    font-size: 5em;  }  footer {    position: relative;    height: 70px;    padding-left: 230px;  }
<div id="main">    <header>      <img src="banner.jpg" width="946" height="246" alt="dogwash" style='border:2px solid #000000'>      <div id="nav">        <ul>          <li><a href="home">home</a>          </li>          <li><a href="bathhouse">diy dog bath house</a>          </li>          <li><a href="services">professional services</a>          </li>          <li><a href="products">products</a>          </li>          <li><a href="contact">contact us</a>          </li>        </ul>      </div>    </header>    <div id="home-image">      <div id="splash-left">        <h1>brockport, ny dog groomer</h1>        <p><span style="font-size: large;">the dog wash "do-it-yourself" bath house</span>        </p>        <p><strong>keep best friend clean , house cleaner our diy dog bathing services! </strong>no appointments necessary - bring in dog , we'll supply rest. bring pooch dog wash "do-it-yourself" bath house          today!</p>        <p>you'll have own gated room equipped waist high tub, professional shampoos , conditioners, clean towels, apron , more!</p>        <p><strong>professional, certified dog grooming services</strong>          <br>we love dog as do! certified groomer patti francisco has 7 years of experience, , provide dog gentle, professional trimming him best.</p>        <p><strong>get know dog wash!</strong>        </p>        <ul>          <li><a href="http://diydogwash.com/brockport-ny-diy-dog-bathing.htm">diy dog bath house </a>- no appointments necessary - leave mess us!</li>          <li><a href="http://diydogwash.com/brockport-ny-dog-grooming.htm">professional services</a> - offer professional dog grooming certified groomer</li>          <li><a href="http://diydogwash.com/brockport-ny-dog-grooming-supplies-collars-dog-toys.htm">products</a> - professional shampoos , conditioners, brand name collars , leads, , more</li>        </ul>        <p><strong>cleanliness king!</strong>          <br>sanitation important us. that's why of tubs , equipment cleaned , sanitized after each use.</p>        <p><strong>keep dog clean without mess! call dog wash @ 585-637-7098 grooming appointment, or bring him 4612 lake rd s. diy bathing services.</strong>          <img src="dogs.jpg" width="550" height="200" alt="dogs" align="right">      </div>      <div id="splash-right">        <img src="coupon.jpg" width="270" height="500" alt="coupon" style='border:2px solid #000000'>      </div>      <br clear="all" />    </div>  </div>  <footer>    <div id="footer">      <br />      <a href="https://www.facebook.com/pages/the-dog-wash-do-it-yourself-bath-house-for-pets/122644714485385" target="_blank">        <img src="fb.png" width="50" height="50" alt="thumb">      </a>    </div>  </footer>

here website link quick visual: http://www.itss.brockport.edu/~rsiss1/cis442/adogwash/home

http://jsfiddle.net/t5fouf4u/1/. can't see issues in fiddle. let me know if have else.

header {   width: 950px;   margin: 0 auto;   height: 250px;   background-color: rgba(144, 214, 32, 1);   min-width: 950px;   z-index: 1;   top: 0px; } header div {   display: inline-block; } #nav {   width: 950px;   content: "";   margin: 0 auto;   display: block;   height: 30px;   line-height: 0;   min-width: 950px;   background: #8bc43f;   text-align: center; } #nav ul {     margin:0px; } 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -