Pixel Reaper
Pixel Reaper

Reputation: 263

How to stop a div above the footer

I have read many posts about this issue, but none of them are helping aid the issue I am having. I want to get the nav_bar on the side of the page to stop right about the footer (exactly where the content div ends.) I am sorry, I am not very good with javascript/jQuery. haha

Here is my code for the nav:

<div id="section">
        <div id="navbar">
            <div id="navbar_contents">
              <ul>
                <li><a href="#"><img src="images/nav_bar/nav_top.jpg" width="107" height="55" alt="top"></a></li>
                <li><a href="#"><img src="images/nav_bar/nav_portfolio.jpg" width="107" height="55" alt="portfolio"></a></li>
                <li><a href="#"><img src="images/nav_bar/nav_about.jpg" width="107" height="55" alt="about"></a></li>
                <li><a href="#"><img src="images/nav_bar/nav_contact.jpg" width="107" height="55" alt="contact"></a></li>
                <li><a href="#"><img src="images/nav_bar/nav_resume.jpg" width="107" height="55" alt="resume"></a></li>
              </ul>
            </div>
         </div>
  <div id="content">
  <h1>THE TOP</h1>
  <div id="clear">
  </div>
  </div>
</div>

and the CSS:

#section #navbar {
    background-color: #FFF;
    height: auto;
    width: auto;
    border: 1px solid #000;
    float: left;
    -moz-box-shadow: 0px 0px 25px 2px #000000;
    -webkit-box-shadow: 0px 0px 25px 2px #000000;
    box-shadow: 0px 0px 25px 2px #000000;
    -webkit-border-radius: 8px;
    -webkit-border-bottom-right-radius: 20px;
    -webkit-border-bottom-left-radius: 20px;
    -moz-border-radius: 8px;
    -moz-border-radius-bottomright: 20px;
    -moz-border-radius-bottomleft: 20px;
    border-radius: 8px;
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 20px;
    padding-right: 23px;
    position: fixed;
}

#section #navbar #navbar_contents {
    width: auto;
    height: auto;
}

#section #navbar ul {
    list-style-type: none;
}

#section #content {
    background-color: #FFF;
    height: 2000px;
    width: 610px;
    border: 1px solid #000;
    float: left;
    margin-left: 200px;
    -moz-box-shadow: 0px 0px 25px 2px #000000;
    -webkit-box-shadow: 0px 0px 25px 2px #000000;
    box-shadow: 0px 0px 25px 2px #000000;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;
    margin-bottom: 20px;
    padding-left: 40px;
    padding-top: 30px;
}

Thank you so much for you help!

Upvotes: 4

Views: 198

Answers (1)

What have you tried
What have you tried

Reputation: 11138

Update

Change your CSS:

#section {
width: 940px;
height: 1500px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
padding-left: 0px;
}

The margin-top you had was causing the nav-bar to be pushed down slightly too far.

Upvotes: 1

Related Questions