0

Like many before me, I am relatively new to HTML & CSS and I have hit a wall! I downloaded a template that had a nav but I went ahead and put in my own fixed nav. I have several sections on my site and the issue I am having is the nav only works when you scroll midway down through the second section! It works perfect from then on but not in the first section!

HTML:

<div class="navbar">
        <a href="#header">Home</a>
        <a href="#one">About Me</a>
        <a href="#two">Portfolio</a>
        <a href="#three">Contact</a>
        <a href="#four">Links</a>
    </div>

CSS:

.navbar {  /* added for fixed navbar*/
    overflow: hidden;
    background-color: black;
    position: fixed;
    top: 0;
    width: 100%;
}

.navbar a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
}

Any thoughts or suggestions greatly appreciated. Thanks.

Kevin

0 Answers0