Display website background underneath transparent navigation bar - html

I need my background-image to display underneath my website transparent navigation bar. The image is located under the .header div
http://prntscr.com/p2moi0
<!Navigation Bar>
<nav>
<div class="navigation-bar">
<img class="logo" src="images/logo-black.png">
Home
Services
Pricing
faq
Contact
</div>
</nav>
<div class="header">
<h1>Website development<br> made easy</h1>
<h3>Not just a business but a reliable business partner</h3>
<button type="button" class="button button-1">get started</button>
<button type="button" class="button button-2">get a quote</button>
</div>
</body>
.header{
background-image: url('images/main-background-header.png');
background-position: center;
height: 100%;
background-repeat: no-repeat;
position: relative;
top: 0;
text-align: center;
.navigation-bar {
width: 100%;
height: 80px;
background-color: transparent;
}

to make it work add background div to your header with height equal to full header height + your navbar height
. your navbar should have a z-index of -1 and the background div should have an absolute position relative to the header:
*{
margin:0;
padding:0;
}
.image{
background-image: url('https://picsum.photos/800');
background-position: center;
height: calc(100% + 80px);
width:100%;
background-repeat: no-repeat;
position: absolute;
z-index:-1;
top: -80px;
text-align: center;
}
.navigation-bar {
width: 100%;
height: 80px;
background-color: transparent;
}
.header{
position:relative;
text-align:center;
color:white;
padding:10px 0px;
}
.navigation-bar{
display:flex;
background:rgba(255,255,255,0.5);
align-items:center;
}
.navigation-bar img{
margin-right:10px;
}
.navigation-bar a{
margin-left:10px;
color:white;
padding:10px;
text-decoration:none;
}
.navigation-bar a:hover{
background-color:white;
color:black;
}
<!Navigation Bar>
<nav>
<div class="navigation-bar">
<img class="logo" src="images/logo-black.png">
Home
Services
Pricing
faq
Contact
</div>
</nav>
<div class="header">
<div class="image"></div>
<h1>Website development<br> made easy</h1>
<h3>Not just a business but a reliable business partner</h3>
<button type="button" class="button button-1">get started</button>
<button type="button" class="button button-2">get a quote</button>
</div>
</body>

Just reset the elements margin and it will work. That is done by making every element
margin:0.
See the example bellow:
*{
margin: 0;
}
.header{
background-image: url('https://i.cbc.ca/1.4955357.1545355364!/fileImage/httpImage/image.jpg_gen/derivatives/16x9_780/man-works-late-at-office-computer.jpg');
background-position: center;
height: 100%;
background-repeat: no-repeat;
position: relative;
top: 0;
text-align: center;
}
.navigation-bar {
width: 100%;
height: 80px;
background-color: transparent;
}
<nav>
<div class="navigation-bar">
<img class="logo" src="images/logo-black.png">
Home
Services
Pricing
faq
Contact
</div>
</nav>
<div class="header">
<h1>Website development<br> made easy</h1>
<h3>Not just a business but a reliable business partner</h3>
<button type="button" class="button button-1">get started</button>
<button type="button" class="button button-2">get a quote</button>
</div>

try like this
HTML
<div class="banner">
<nav>
<div class="navigation-bar">
<img class="logo" src="images/logo-black.png">
Home
Services
Pricing
faq
Contact
</div>
</nav>
<div class="header">
<h1>Website development<br> made easy</h1>
<h3>Not just a business but a reliable business partner</h3>
<button type="button" class="button button-1">get started</button>
<button type="button" class="button button-2">get a quote</button>
</div>
</div>
css
.banner{
background-image: url('https://image.freepik.com/free-psd/abstract-background-design_1297-73.jpg');
background-position: center;
height: 100%;
background-repeat: no-repeat;
position: relative;
top: 0;
text-align: center;
padding:40px 0;
}
.nav {
width: 100%;
height: 80px;
background-color: transparent;
text-align:center;
}

Related

When viewed in older browser,the text appears right next to the other text in wrapper div when its supposed to be on the right side

In my website,http://rajitaviation.000webhostapp.com there is a wrapper div in which there is text on left then image and then text on right. But when viewed on older browsers like firefox 35, the text renders right next to the text on left and overlaps the image help!
If I apply resets then my font size becomes defaults which I don't want so is
any way i can pull out a perfect website??
.intro{
width:100%;
font-family:Anaheim;
font-size:4.5vw;
text-align:center;
}
.next{
font-size:2.5vw;
width:100%;
text-align:center;
}
.hero-image {
background-image: url('G:/Aviaition/a350.jpg');
background-position:center;
background-repeat: no-repeat;
background-size:50% 100%;
position: relative;
width:100%;
}
.hero-image2{
background-image: url('G:/Aviaition/a380.jpg');
background-position:center;
background-repeat: no-repeat;
background-size:50% 100%;
position: relative;
width:100%;
}
.hero-image3{
background-image: url('G:/Aviaition/a321.jpg');
background-position:center;
background-repeat: no-repeat;
background-size:50% 100%;
position: relative;
width:100% ;
}
.hero-image4{
background-image: url('G:/Aviaition/a340.jpg');
background-position:center;
background-repeat: no-repeat;
background-size:50% 100%;
position: relative;
width:100%;
}
.hero-image5{
background-image: url('G:/Aviaition/a320.jpg');
background-position:center;
background-repeat: no-repeat;
background-size:50% 125%;
position: relative;
width:100%;
}
.hero-image6{
background-image: url('G:/Aviaition/a319.jpg');
background-position:center;
background-repeat: no-repeat;
background-size:50% 100%;
position: relative;
width:100%;
}
.hero-image7{
background-image: url('G:/Aviaition/a330.jpg');
background-position:center;
background-repeat: no-repeat;
background-size:50% 100%;
position: relative;
width:100%;
}
.hero-image8{
background-image: url('G:/Aviaition/a318.jpg');
background-position:center;
background-repeat: no-repeat;
background-size:50% 100%;
position: relative;
width:100%;
}
.hero-image9{
background-image: url('G:/Aviaition/a300.jpg');
background-position:center;
background-repeat: no-repeat;
background-size:50% 100%;
position: relative;
width:100%;
}
.hero-text {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size:1.5vw;
}
.hero-text button {
border: none;
outline: 0;
display: inline-block;
padding: 8px 7px;
color: black;
background-color: white;
text-align: center;
cursor: pointer;
font-size:1vw;
width:100%;
}
.hero-text button:hover {
background-color: white;
color:black;
}
.text{
text-align:left;
font-family:Anaheim;
font-size:2vw;
float:left;
overflow:hidden;
}
.text1{
font-family:Anaheim;
font-size:2.5vw;
overflow:hidden;
float:left;
text-align:left;
}
.text3{
text-align:left;
font-family:Anaheim;
font-size:1.95vw;
float:left;
overflow:hidden;
}
.text2{
text-align:right;
font-family:Anaheim;
font-size:2.75vw;
text-align: justify;
text-align-last:right;
overflow:hidden;
}
.text4{
text-align:right;
font-family:Anaheim;
font-size:2.5vw;
text-align: justify;
text-justify:inherit;
text-align-last:right;
overflow:hidden;
}
.text6{
text-align:right;
font-family:Anaheim;
font-size:2.75vw;
text-align: justify;
text-align-last:right;
overflow:hidden;
}
.text7{
text-align:right;
font-family:Anaheim;
font-size:2.5vw;
text-align: justify;
text-align-last:right;
overflow:hidden;
}
<body>
<span class="hide">
<div class="intro">
Welcome To RAJIT GAMING-AVIATION!
<br>
<div class="next">
Here you will find information about all airbus planes!
<br>
Hope you enjoy!
</div>
</div>
<marquee direction=left; behavior=scroll; scrollamount=6; style="font-family:Anaheim;">
This website is still under development.
Information about planes and THE NEOs will
be out soon!
</marquee>
<hr>
<div class="hero-image">
<div id="wrapper">
<div class="text1">
"The most advanced <br>airliner in the skies"<br>
-Business insider
</div>
<div class="text7">
Three models<br>A350-1000<br>A350-900<br>A350-800
</div>
</div>
<div class="hero-text">
<h1>THE A350</h1>
<button onclick="location.href='A350.html';">CHECK IT OUT!</button>
</div>
</div>
</div>
<div>
<hr>
<div class="hero-image2">
<div id="wrapper">
<div class="text1">
"The biggest <br>airliner in the skies"<br>
-Wikipedia
</div>
<div class="text6">
Two models<br>A380-800<br>A380-f
</div>
</div>
<div class="hero-text">
<h1>THE A380</h1>
<button onclick="location.href='A380.html';">CHECK IT OUT!</button>
</div>
</div>
<hr>
<div class="hero-image3">
<div id="wrapper">
<div class="text3">
"The most efficient <br>single-aisle<br>airliner ever built"<br>
-Phillippine airlines
</div>
<div class="text2">
Two models<br>A321-100<br>A321-200
</div>
</div>
<div class="hero-text">
<h1>THE A321</h1>
<button onclick="location.href='A321.html';">CHECK IT OUT!</button>
</div>
</div>
<hr>
<div class="hero-image4">
<div class="text">
"The longest<br>airliner ever built"<br>
-Trip advisor
</div>
<div class="text2">
Four models<br>A340-200<br>500,600 and 300
</div>
<div class="hero-text">
<h1>THE A340</h1>
<button onclick="location.href='A340.html';">CHECK IT OUT!</button>
</div>
</div>
<hr>
<div class="hero-image5">
<div class="text">
"The most<br>selling commercial<br>aircraft"<br>
-wikipedia
</div>
<div class="text2">
Two models<br>A320-100<br>A320-200
</div>
<div class="hero-text">
<h1>THE A320</h1>
<button onclick="location.href='A320.html';">CHECK IT OUT!</button>
</div>
</div>
<hr>
<div class="hero-image6">
<div class="text">
"The beginning<br>of a new era of<br>efficiency of fuel"<br>
-Lufthansa
</div>
<div class="text4">
Eight models<br>A319-111,<br>112,113,114,115,<br>131,132 and 133
</div>
<div class="hero-text">
<h1>THE A319</h1>
<button onclick="location.href='A319.html';">CHECK IT OUT!</button>
</div>
</div>
</div>
<hr>
<div class="hero-image7">
<div class="text">
"The A320<br>reimagined"<br>
-Air India
</div>
<div class="text2">
Three models<br>A330-200<br>A330-200F<br>A330-300
</div>
<div class="hero-text">
<h1>THE A330</h1>
<button onclick="location.href='A330.html';">CHECK IT OUT!</button>
</div>
</div>
<hr>
<div class="hero-image8">
<div class="text3">
"The smallest and<br>most compact<br>commercial airliner yet"<br>
-Air India
</div>
<div class="text4">
Four models<br>A318-111,112,<br>121 and 122
</div>
<div class="hero-text">
<h1>THE A318</h1>
<button onclick="location.href='A318.html';">CHECK IT OUT!</button>
</div>
</div>
<hr>
<div class="hero-image9">
<div class="text3">
"The world's first<br>twin-engine widebody<br> aircraft"<br>
-Wikipedia
</div>
<div class="text2">
Three models<br>A300B4<br>A300-600<br>A300B10
</div>
<div class="hero-text">
<h1>THE A300</h1>
<button onclick="location.href='A300.html';">CHECK IT OUT!</button>
</div>
</div>

Navbar to follow wherever I scroll

I'm trying to set my navbar to be on top whenever I scroll, but when i use position: fixed; the navbar disappears. Here's my html and css respectively.
<nav>
<div class="navbar">
<button class="btn button"> Home <A href="#"> </button>
<button class="btn button"> About Me </button>
<button class="btn button"> Portfolio</button>
<button class="btn button"> Contact Me </button>
</div>
</nav>
<div class="background-img">
</div>
<div class="portfolio">
<img src="https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjP5v6bzfDWAhXEto8KHc_gBDoQjRwIBw&url=http%3A%2F%2Fhomequity.us%2Fdesignhouse%2Fbungalow_house_design_malaysia.html&psig=AOvVaw3hVzFHYi5ropXAhSrn1oIx&ust=1508087256948636">
</div>
The CSS
nav{
background-color: transparent;
position: fixed;
}
.btn{
background-color: Black;
color: white;
font-size: 30px;
padding: 10px;
margin: 10px 193px 10px 0px;
}
.background-img {
background: url(https://images.unsplash.com/photo-1497215842964-222b430dc094?dpr=1&auto=compress,format&fit=crop&w=2100&h=&q=80&cs=tinysrgb&crop=);
background-size: 100% 100%;
background-repeat: no-repeat;
width: 100vw;
height: 100vh;
position: relative;
}
`
You still need to define it's fixed position as top:0.
nav{
background-color: transparent;
position: fixed;
top:0;
width:100%;
z-index:15;
}
The reason is z-index value. And one more thing you probably forget to close the a tag in nav section.
nav{
background-color: transparent;
position: fixed;
z-index:99999; /* add z-index value maximum */
}
.btn{
background-color: Black;
color: white;
font-size: 30px;
padding: 10px;
margin: 10px 193px 10px 0px;
}
.background-img {
background: url(https://images.unsplash.com/photo-1497215842964-222b430dc094?dpr=1&auto=compress,format&fit=crop&w=2100&h=&q=80&cs=tinysrgb&crop=);
background-size: 100% 100%;
background-repeat: no-repeat;
width: 100vw;
height: 100vh;
position: relative;
}
<nav>
<div class="navbar">
<button class="btn button"> Home </button><!-- You need to close the a tag -->
<button class="btn button"> About Me </button>
<button class="btn button"> Portfolio</button>
<button class="btn button"> Contact Me </button>
</div>
</nav>
<div class="background-img">
</div>
<div class="portfolio">
<img src="https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjP5v6bzfDWAhXEto8KHc_gBDoQjRwIBw&url=http%3A%2F%2Fhomequity.us%2Fdesignhouse%2Fbungalow_house_design_malaysia.html&psig=AOvVaw3hVzFHYi5ropXAhSrn1oIx&ust=1508087256948636">
</div>

Parallax effect not working on certain pages

I am currently making a website and I have run into a little snag. One of my pages currently has a parallax effect on it. I tried to apply the same effect to another page(third page) and for some reason it will not work on that page. I was wondering if anyone knew why my method is not working?
CSS and HTML
body{
background-color: teal;
font-family:Orbitron;
color:white;
}
.fa-stack-overflow{
color: #f48024
}
.fa-github{
color:rgb(102,43,129);
}
.fa-linkedin{
color:rgb(0,127,178);
}
.fa-facebook-official{
color:rgb(59, 89, 153);
}
.nav-pills{
font-size: 1.7em;
background-color: none;
margin-bottom: 10%;
}
.block{
background-color: #337ab7;
padding:10px;
width:50%;
margin-right: auto;
margin-left: auto;
border-radius:5px;
}
h1{
padding:0;
margin-top: 0px;
font-size: 5.0em;
}
.btn-default{
font-size:1.7em;
color:#337ab7;
}
.pageOne{
background: url(https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb);
background-repeat: none;
background-size: cover;
height: 1000px;
}
/*
parallax effect start
*/
.pageOne, .pageThree{
position: relative;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
}
/*
parallax effect end
*/
.pageTwo{
background: teal;
background-repeat: none;
background-size: cover;
height: 400px;
padding-top: 5%;
}
.pageTwoblock{
border-radius:5px;
}
p{
font-size: 1.8em;
}
.me{
height: 850px;
display:block;
margin-right: auto;
margin-left: auto;
}
.pageThree{
background: url(https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb);
background-repeat: none;
background-size: cover;
height: 1000px;
padding-top:5%;
}
.container{
width:80%;
margin:auto;
overflow:auto;
}
section{
padding:20px 0;
overflow:hidden;
}
#gallery{
list-style: none;
margin: 0;
padding: 0;
width: 100%;
}
#gallery li{
display: block;
float: left;
width: 23%;
cursor: pointer;
border: 5px;
box-sizing: border-box;
margin: 0 12px 7px 0;
position: relative;
}
#gallery img{
width:100%;
border-radius:5%
}
.pageFour{
background: url(https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb);
background-repeat: none;
background-size: cover;
height: 1000px;
padding-top:5%;
}
<!DOCTYPE html>
<html>
<head>
<title>Daniel's Portfolio | Welcome</title>
<link rel="stylesheet" href="CSS/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="CSS/style.css">
<link rel="stylesheet" href="CSS/font-awesome.min.css">
<script src="main.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Orbitron" rel="stylesheet">
</head>
<body>
<div class="pageOne text-center">
<ul class = "nav nav-pills">
<li>
Daniel Collins
</li>
<li class="pull-right">
Contact Me
</li>
<li class="pull-right">
Portfolio
</li>
<li class="pull-right">
About Me
</li>
</ul>
<div class="block text-center">
<h1>Daniel's Portfolio Website</h1>
<h2>Various Web Projects</h2>
</div>
<div class = "btnList text-center">
<a class = "btn btn-default" href="https://stackoverflow.com/users/7024823/daniel"><i class="fa fa-stack-overflow" aria-hidden="true"></i>Stack Overflow</a>
<a class = "btn btn-default" href="https://github.com/casteyes"><i class="fa fa-github" aria-hidden="true"></i>GitHub</a>
<a class = "btn btn-default" href="https://www.linkedin.com/in/daniel-collins-927b1ab0/"><i class="fa fa-linkedin" aria-hidden="true"></i>Linkedin</a>
<a class = "btn btn-default" href="https://www.facebook.com/daniel.p.collins1"><i class="fa fa-facebook-official" aria-hidden="true"></i>Facebook</a>
</div>
</div>
<div class= "pageTwo text-center" id="p2">
<div class= "pageTwoblock">
<div class="row">
<div class ="text-center">
<h1>Daniel Collins</h1>
<p class"text-center">
I’m a web developer and designer living in Jacksonville, Florida, United States. I spend my days with my hands in many
different areas of web development from back end programming (PHP, C#, Java) to front end engineering
(HTML, CSS, and jQuery/Javascript), digital accessibility, user experience and visual design.
</p>
</div>
</div>
</div>
</div>
<div class= "pageThree" id="p3">
<header>
<div class="block text-center">
<h1 class = "logo">Portfolio</h1>
</div>
</header>
<section>
<div class="container>
<h1 id="heading">All Projects</h1>
<ul id="gallery">
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"></li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"></li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"></li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"></li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"></li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"></li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"</li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"</li>
</ul>
</div>
</section>
</div>
<div class= "pageFour text-center" id="p4">
</div>
</body>
</html>
Please check this. background-attachment: fixed; is missing from other divs.
body{
background-color: teal;
font-family:Orbitron;
color:white;
}
.fa-stack-overflow{
color: #f48024
}
.fa-github{
color:rgb(102,43,129);
}
.fa-linkedin{
color:rgb(0,127,178);
}
.fa-facebook-official{
color:rgb(59, 89, 153);
}
.nav-pills{
font-size: 1.7em;
background-color: none;
margin-bottom: 10%;
}
.block{
background-color: #337ab7;
padding:10px;
width:50%;
margin-right: auto;
margin-left: auto;
border-radius:5px;
}
h1{
padding:0;
margin-top: 0px;
font-size: 5.0em;
}
.btn-default{
font-size:1.7em;
color:#337ab7;
}
.pageOne{
background: url(https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb);
background-repeat: none;
background-size: cover;
height: 1000px;
}
/*
parallax effect start
*/
.pageOne, .pageThree{
position: relative;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
}
/*
parallax effect end
*/
.pageTwo{
background: teal;
background-repeat: none;
background-size: cover;
height: 400px;
padding-top: 5%;
background-attachment: fixed;
}
.pageTwoblock{
border-radius:5px;
}
p{
font-size: 1.8em;
}
.me{
height: 850px;
display:block;
margin-right: auto;
margin-left: auto;
}
.pageThree{
background: url(https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb);
background-repeat: none;
background-size: cover;
height: 1000px;
padding-top:5%;
background-attachment: fixed;
}
.container{
width:80%;
margin:auto;
overflow:auto;
}
section{
padding:20px 0;
overflow:hidden;
}
#gallery{
list-style: none;
margin: 0;
padding: 0;
width: 100%;
}
#gallery li{
display: block;
float: left;
width: 23%;
cursor: pointer;
border: 5px;
box-sizing: border-box;
margin: 0 12px 7px 0;
position: relative;
}
#gallery img{
width:100%;
border-radius:5%
}
.pageFour{
background: url(https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb);
background-repeat: none;
background-size: cover;
height: 1000px;
padding-top:5%;
background-attachment: fixed;
}
<!DOCTYPE html>
<html>
<head>
<title>Daniel's Portfolio | Welcome</title>
<link rel="stylesheet" href="CSS/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="CSS/style.css">
<link rel="stylesheet" href="CSS/font-awesome.min.css">
<script src="main.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Orbitron" rel="stylesheet">
</head>
<body>
<div class="pageOne text-center">
<ul class = "nav nav-pills">
<li>
Daniel Collins
</li>
<li class="pull-right">
Contact Me
</li>
<li class="pull-right">
Portfolio
</li>
<li class="pull-right">
About Me
</li>
</ul>
<div class="block text-center">
<h1>Daniel's Portfolio Website</h1>
<h2>Various Web Projects</h2>
</div>
<div class = "btnList text-center">
<a class = "btn btn-default" href="https://stackoverflow.com/users/7024823/daniel"><i class="fa fa-stack-overflow" aria-hidden="true"></i>Stack Overflow</a>
<a class = "btn btn-default" href="https://github.com/casteyes"><i class="fa fa-github" aria-hidden="true"></i>GitHub</a>
<a class = "btn btn-default" href="https://www.linkedin.com/in/daniel-collins-927b1ab0/"><i class="fa fa-linkedin" aria-hidden="true"></i>Linkedin</a>
<a class = "btn btn-default" href="https://www.facebook.com/daniel.p.collins1"><i class="fa fa-facebook-official" aria-hidden="true"></i>Facebook</a>
</div>
</div>
<div class= "pageTwo text-center" id="p2">
<div class= "pageTwoblock">
<div class="row">
<div class ="text-center">
<h1>Daniel Collins</h1>
<p class"text-center">
I’m a web developer and designer living in Jacksonville, Florida, United States. I spend my days with my hands in many
different areas of web development from back end programming (PHP, C#, Java) to front end engineering
(HTML, CSS, and jQuery/Javascript), digital accessibility, user experience and visual design.
</p>
</div>
</div>
</div>
</div>
<div class= "pageThree" id="p3">
<header>
<div class="block text-center">
<h1 class = "logo">Portfolio</h1>
</div>
</header>
<section>
<div class="container>
<h1 id="heading">All Projects</h1>
<ul id="gallery">
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"></li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"></li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"></li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"></li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"></li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"></li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"</li>
<li> <img src="https://images.pexels.com/photos/311039/pexels-photo-311039.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"</li>
</ul>
</div>
</section>
</div>
<div class= "pageFour text-center" id="p4">
</div>
</body>
</html>

Fixed navbar overlaps <div> element, causes Navbar to stop working

So I've created the Navbar which jumps to sections on the page via clicking. It works for my 'projects' and 'contact' sections but when I click 'about' the navbar jumps to it, but becomes transparent and unclickable. I tried adding a padding-top X px; to the 'about' element, but it still doesn't work.
Code is as follows in Codepen:
HTML:
<body>
<div class="fluid-container">
<h2> My Web Portfolio</h2>
<!--Creates the Navigation bar -->
<div class="navbar">
About
Projects
Contact
</div>
<!-- this creates the About section-->
<div class="main">
<div id=about>
<h3>Blank</h3>
</div>
<!-- This creates the 'project' section of the webpage-->
<div id=projects>
<h3><pre>My tribute page to Neil Armstrong<pre></h3>
<a href="#"><img border="0" alt="My Tribute page" align="center" src="#"/>
</a>
</div>
<!--contact section-->
<div id=contact>
<h3>Contact me via Facebook, Twitter, and Instagram!<h3>
<a href="#" class="fa fa-facebook" ></a>
</div>
</div>
</div>
</body>
CSS:
body {
background-color:turquoise;
padding-top:25px;
}
h2 {
text-align:center;
}
.navbar {
overflow:hidden;
background-color:#333;
position:fixed;
top:0px;
width:100%;
}
.navbar a {
float:left;
display:block;
color:#f2f2f2;
text-align:center;
padding:14px 16px;
text-decoration:none;
font-size:17px;
}
.main {
padding:16px;
margin-top:65px;
}
#projects {
position:relatve;
width:150px;
height:100px;
margin-top:200px;
margin-left:150px;
}
#contact {
position:relatve;
text-align:center;
margin-top:800px;
}
#about{
position:relative;
text-align:center;
padding-top:25px;
}
What am I doing wrong here?
When the page jumps to about, the sections obscure the nav bar. If you set a z-index to #main and the nav bar, you can ensure the navbar is always above the sections. I hope this helps.
body {
background-color: turquoise;
padding-top: 25px;
}
h2 {
text-align: center;
}
.navbar {
overflow: hidden;
background-color: #333;
position: fixed;
top: 0px;
width: 100%;
z-index: 10;
}
.navbar a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.main {
padding: 16px;
position: relative;
z-index: 0
margin-top: 65px;
}
#projects {
position: relatve;
width: 150px;
height: 100px;
margin-top: 200px;
margin-left: 150px;
}
#contact {
position: relatve;
text-align: center;
margin-top: 800px;
}
#about {
position: relative;
text-align: center;
padding-top: 25px;
}
<body>
<div class="fluid-container">
<h2> My Web Portfolio</h2>
<!--Creates the Navigation bar -->
<div class="navbar">
About
Projects
Contact
</div>
<!-- this creates the About section-->
<div class="main">
<div id=about>
<h3>Blank</h3>
</div>
<!-- This creates the 'project' section of the webpage-->
<div id=projects>
<h3><pre>My tribute page to Neil Armstrong<pre></h3>
<a href="#"><img border="0" alt="My Tribute page" align="center" src="#"/>
</a>
</div>
<!--contact section-->
<div id=contact>
<h3>Contact me via Facebook, Twitter, and Instagram!<h3>
<a href="#" class="fa fa-facebook" ></a>
</div>
</div>
</div>
</body>

Side banner on a webpage

How would I make it so the banners along the top and bottom of this page (http://i.imgur.com/SxjbCJV.jpg) are instead at both sides of the page?
I currently have them both fixed to the top and bottom of the page:
#header {
position: fixed;
top: 0;
width: 100%;
height: 66px;
z-index: 999;
}
#footer {
position: fixed;
bottom: 0;
width: 100%;
height: 66px;
z-index: 999;
}
And the HTML:
<body>
<div id="wrapper">
<a href="project.html">
<div id="header">
<button id="next-button" href="project.html"><i class="fa fa-arrow-circle-right fa-4x"></i>
</button>
</div>
</a>
<div id="main">
<div id="splash">
<div id="name">
<h1 class="wow animated flipInX">Max Wilson</h1>
</div>
<div id="profile">
<img src="img/Logo.png" class="wow animated rollIn" data-wow-delay="1s">
</div>
<div id="subtext">
<h2 class="wow animated fadeInUp" data-wow-delay="2s">Aspiring Developer </h2>
</div>
</div>
</div>
</div>
<a href="project.html">
<div id="footer">
<button id="prev-button" href="project.html"><i class="fa fa-arrow-circle-left fa-4x"></i>
</button>
</div>
</a>
Have you tried floating the header and footer to the left?
For example:
#header {
position: relative;
float: left;
width: 50px;
height: 500px;
background-color: #44f;
}
#footer {
position: relative;
float: left;
width: 50px;
height: 500px;
background-color: #44f;
}
#wrapper{ text-align: center;
margin-left: auto;
margin-right: auto;
}
#main{ width: 800px;
float:left;
}
Here's a simple and interesting method: giving the body display: flex and the content flex-grow: 1 so it occupies all the available space and pins the other elements to either side.
<div class="side">
<h3>asdf</h3>
<h3>asdf</h3>
<h3>asdf</h3>
<h3>asdf</h3>
</div>
<div id="content">
<p>asdfasdf</p>
</div>
<div class="side">
<h3>asdf</h3>
<h3>asdf</h3>
<h3>asdf</h3>
<h3>asdf</h3>
</div>
body {
display: flex;
}
.side, #content {
padding: 10px;
}
.side {
background: blue;
}
#content {
flex-grow: 1;
background: grey;
}
https://jsfiddle.net/JackHasaKeyboard/rz86xwxh/2/