Travis Musickz
Travis Musickz

Reputation: 1

HTML Navigation bar disappearing on page load

Hello I have created a website for my school work and I am trying to implement a navigation bar for all the pages of the site. I got it working on all my other pages but there is one page in particular where it the entire navigation bar disappears when the page is loaded. The header section should display the navigation bar while the body loads the prime number table.The page should have a navbar like this. However the prime number table page will not load the home and back icons.

I cant get the stackoverflow formatter to accept my html code so I have to put a link to it, sorry!.

This is the source code

Upvotes: 0

Views: 2085

Answers (2)

swallace
swallace

Reputation: 408

Move your div with the class of header outside of the head section of the document. It should be within the body tags.

Upvotes: 0

Brian Mains
Brian Mains

Reputation: 50728

Headers should not be in the <head> element; instead, they should be at the top of the <body> element. So move this code:

<div class="header">
            <div class="container">
                <div class="navbar">
                    <a class="logo" href="http://w3.cnm.edu/~tteichelmann"></a>
                    <a class="back" href="http://w3.cnm.edu/~tteichelmann/cis1210" onclick="history.back();" value="Back"></a>

                </div>
        </div>
</div>

Into the body. Also, HTML 5 introduced the <header> element (more here), which is a more syntactical way of defining a header... Consider that an alternative, not a requirement.

Upvotes: 1

Related Questions