I'm pretty new to web coding, but working currently on a small project for a community of mine, where I try to create a small simple website with basic information.
My issue here is I can't get to work with my dropdown menu, it wont show on hove over or show my dropdown menu, but once I remove button my dropdown menu will work proberly.
body {
font-family: Arial;
}
/* used # is id="" under html code */
/* used . is class="" under html code */
/* Change value inside #navbar, will change style on main menu */
#navbar {
overflow: hidden;
position: fixed;
list-style-type: none;
top: 0;
width: 100%;
text-align: center;
text-transform: uppercase;
font-weight: bold;
}
#navbar a {
float: left;
display: block;
color: #732119;
text-align: center;
padding: 10px 10px;
text-decoration: none;
font-size: 12px;
}
#navbar a:hover {
background: #F2CDA0;
color: #732119;
opacity: 0.7;
}
/* Change value inside navdown, will change style on Dropdown menu */
.dropdown {
float: left;
overflow: hidden;
}
.dropdown .dropbtn {
font-size: 12px;
font-weight: bold;
text-transform: uppercase;
border: 0;
outline: 0;
padding: 10px 10px;
background-color: inherit;
color: #732119;
}
.dropdown-content {
display: none;
position: absolute;
background-color: inherit;
min-width: 140px;
z-index: 1;
}
.dropdown-content a {
float: none;
color: #732119;
padding: 10px 10px;
text-decoration: none;
display: block;
text-align: center;
}
.dropdown-content a:hover .dropbtn {
background: #F2CDA0;
color: #732119;
}
/* Change value inside this, will change logo on the site */
#img_center {
display: block;
margin-right: auto;
margin-left: auto;
}
/* Center everything on the side inside <table> */
#table_main {
margin-left: auto;
margin-right: auto;
}
/* Footer style, customize footer bar here */
#footer {
position: fixed;
text-transform: uppercase;
text-align: center;
font-size: 12px;
font-weight: bold;
color: black;
left: 0;
bottom: 0;
width: 100%;
}
#h2_headertext {
font-size: 16px;
text-transform: uppercase;
}
<table id="table_main">
<tr>
<td>
<!-- Main Menu -->
<ul id="navbar">
<li>Forside</li>
<li>Bliv Medlem</li>
<li>Medlemsfordele</li>
<!-- Dropdown Menu -->
<div class="dropdown">
<button class="dropbtn">Information</button>
<div class="dropdown-content">
Vedtægter
Regler
Hvem er vi
Bestyrelsen
</div>
</div>
<li><a class="active" href="#kontakt">Kontakt</a></li>
</ul>
<!--Center picture of the side -->
<div id="img_center">
<img src="images/logo.png" alt="">
<h2 id="h2_headertext">Velkommen</h2>
</div>
</td>
</tr>
</table>
<div id="footer">
<p>Copyright 2022</p>
</div>
Please study the following model code carefully. It shows the principle of a dropdown menu on CSS . There is literally nothing there. Learn to understand how it works.
ul,
li {
list-style: none;
padding: 0;
}
.submenu {
display: none;
}
.item:hover>.submenu {
display: block;
}
<ul class="menu">
<li class="item">
Hover me!
<ul class="submenu">
<li class="subitem">subitem1</li>
<li class="subitem">subitem2</li>
<li class="subitem">subitem3</li>
</ul>
</li>
</ul>
Related
I am trying to create one link, Buying Tips, in my navigation menu as a drop down menu. I am running into a few problems and nothing I do seems to fix these issues.
For some reason when I scroll over Buying Tips, the first option of my drop down menu overlaps the navigation menu. I am not sure why this is happening and how to correct this.
I would like the drop down arrow to show but not sure how to code this in CSS.
I would like the navigation links to be equally spaced out and Buying Tips is all on one line. (please view image to see problem) I tried changing the width of the navbar and change the font sizes of navigation links but that does not help.
Printscreen of navigation issues on webpage
.navbar {
width: 100%;
background-color: black;
overflow: auto;
}
.navbar a {
float: left;
padding: 5px;
color: white;
text-align: center;
text-decoration: none;
font-size: 20px;
width: 24%;
}
.navbar a:hover {
color: #FFA500
}
.dropdown {
float: left;
overflow: hidden;
}
.dropdown .BuyTip {
float: left;
color: white;
text-align: center;
text-decoration: none;
font-size: 20px;
}
.dropdown-content {
display: none;
position: absolute;
min-width: 200px;
}
.dropdown-content a {
float: none;
color: black;
display: block;
text-align: left;
font-size: 10px;
}
.dropdown:hover .dropdown-content {
display: block;
}
#media screen and (max-width: 480px) {
.navbar a {
float: none;
display: block;
width: 100%;
}
}
<div class="navbar">
Chade's Bicycle Company
<div class="dropdown">
<a class="BuyTip">Buying Tips</a>
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
Choosing The Correct Bike
Setting A Budget
Test-Ride Before Buying
Choosing The Correct Size
The Essential Accessories
</div>
</div>
Company Calendar
Contact Us
</div>
I've changed your code to achieve the desired result.
As for the questions you've asked:
Since you've made the element bearing the .dropdown class absolutely positioned it will stick to the top since it has no relative parent.
I've used a CSS border property to create an arrow. You can customize it as you wish. (even replace it with the caret class you've used originally, as long as you position it appropriately.)
You can control the spacing between the navigation links using CSS margin or padding properties. read-more about padding and margin.
.navbar {
width: 100%;
background-color: black;
overflow: auto;
font-size: 0;
}
.navbar li {
display: inline-block;
margin: 0 10px;
}
.navbar li a {
display: block;
padding: 5px;
color: white;
text-align: center;
text-decoration: none;
font-size: 20px;
}
.navbar a:hover {
color: #FFA500
}
.dropdown>a {
position: relative;
padding-right: 10px;
}
.dropdown>a:after {
content: "";
display: block;
border-width: 6px;
border-style: solid;
border-right: 6px solid transparent;
border-color: red transparent transparent;
width: 0;
height: 0;
position: absolute;
right: -14px;
top: 14px;
}
.dropdown-content {
display: none;
position: absolute;
padding: 10px 0;
}
.navbar li .dropdown-content a {
color: black;
display: block;
text-align: left;
font-size: 10px;
}
.dropdown:hover .dropdown-content {
display: block;
}
#media screen and (max-width: 800px) {
.navbar li a {
font-size: 16px;
}
.dropdown>a:after {
border-width: 5px;
border-right: 5px solid transparent;
right: -10px;
top: 12px;
}
}
<div class="navbar">
<ul>
<li>Chade's Bicycle Company</li>
<li class="dropdown">
<a>Buying Tips</a>
<div class="dropdown-content">
Choosing The Correct Bike
Setting A Budget
Test-Ride Before Buying
Choosing The Correct Size
The Essential Accessories
</div>
</li>
<li>Company Calendar</li>
<li>Contact Us </li>
</ul>
</div>
I am working on a horizontal navigation bar with a dropdown menu. I'm quite new to making codes so this is maybe a stupid question. My navigation is sticking to the left of my website, but I need it to stay in line with the text and I can't get the navigation bar threw my whole webpage how do I fix this?
photo of my website with the 2 problems:
enter image description here
nav {
position: absolute;
}
.horizontal {
list-style-type: none;
margin: 40 auto;
width: 640px;
padding: 0;
overflow: hidden;
}
.horizontal>li {
float: left;
}
.horizontal li ul {
display: none;
margin: 0;
padding: 0;
list-style: none;
position: relative;
width: 100%;
}
.horizontal li:hover ul {
display: inline-block;
}
.horizontal li a {
display: block;
text-decoration: none;
text-align: center;
padding: 22px 10px;
font-family: arial;
font-size: 8pt;
font-weight: bold;
color: #FFFFFF;
text-transform: uppercase;
border-right: 1px solid #607987;
background-color: #006600;
letter-spacing: .08em;
width: 70px;
}
.horizontal li a:hover {
background-color: darkorange;
color: #a2becf
}
.horizontal li:first-child a {
border-left: 0;
}
.horizontal li:last-child a {
border-right: 0;
}
h1 {
margin-top: 80px;
}
<nav id="mainnav">
<ul class="horizontal">
<li>Home</li>
<li>Planning</li>
<li>Takken
<ul>
<li>Kapoenen</li>
<li>Kawellen</li>
<li>Kajoo's</li>
<li>Jojoo's</li>
<li>Givers</li>
<li>Jin</li>
<li>Akabe</li>
</ul>
</li>
<li>Kleding</li>
<li>Contact
<ul>
<li>Leiding</li>
<li>Verhuur</li>
</ul>
</li>
<li>Inschrijven</li>
</ul>
</nav>
Two things in your css are giving you trouble.
nav{ position: absolute; } means this div will not fill the width.
horizontal{ margin: 40 auto;} 40 is not valid.
You MUST specify a measurement unit in CSS, so it should be 40px if I'm guessing your intention, but other units are available.
Here is amended css you can try.
nav {
width: 100%;
background-color: #006600;
}
.horizontal {
list-style-type: none;
margin: 40px auto;
width: 640px;
padding: 0;
overflow: hidden;
}
Step 1) Add HTML:
Example
<!-- The navigation menu -->
<div class="navbar">
<a class="active" href="#">Home</a>
Planning
Takken
Kleding
Contact
Inschrijven
</div>
And CSS:
.navbar {
width: 100%;
background-color: #555;
overflow: auto;
}
.navbar a {
float: left;
padding: 12px;
color: white;
text-decoration: none;
font-size: 17px;
width: 15%;; /* Four links of equal widths */
text-align: center;
}
I coded this website entirely in HTML and CSS without using any libraries. The dropdown menu works perfectly fine on any computer or Android phone and I have tested in using multiple web browsers. On iPhones, the dropdown menu doesn't appear on the screen.
I thought it had to do with the issue of iPhone not supporting :hover, but after a lot of testing and attempts to fix it, I have found that the hover is not the problem. After clicking the nav, I have found that although not visible, the links in the dropdown menu work if I click on the correct place where it should be. Essentially, the dropdown menu and the links are there, but they can't be seen. I have tried adding visiblity: visible, z-index: 999 and several different display values but the problem persists.
nav {
position: relative;
background: white;
border: .05em solid #004EA8;
width: 100%;
}
nav .logo {
margin-bottom: .3em;
}
nav a {
color: white;
text-decoration: none;
display: block;
text-align: center;
}
nav ul,
nav:active ul {
list-style: none;
display: flex;
flex-direction: column;
position: fixed;
padding: 20px;
background: white;
top: 3.8em;
width: 100%;
}
.nav-sections {
display: none;
width: 100%;
}
.navbar-link {
display: flex;
flex-direction: column;
font-style: none;
text-decoration: none;
color: #004EA8;
}
.dropdown {
display: inline-block;
}
nav li,
.dropbtn {
background-color: white;
font: inherit;
text-align: center;
width: 100%;
padding: 5px 0;
margin: 0;
width: 100%;
}
.dropbtn a {
color: #004EA8;
}
nav:hover ul {
display: block;
}
.dropbtn {
display: flex;
flex-direction: column;
font-style: none;
color: white;
padding: 0;
}
.dropdown-content {
display: none;
}
.nav-button {
display: inline-block;
float: right;
color: white;
margin: .75em .6em .4em 1em;
}
.hamburger {
position: relative;
display: inline-block;
width: 1.25em;
height: 1.2em;
margin-top: .85em;
margin-right: 0.3em;
border-top: 0.2em solid #004EA8;
border-bottom: 0.2em solid #004EA8;
}
.hamburger:before {
content: "";
position: absolute;
top: 0.3em;
left: 0px;
width: 100%;
border-top: 0.2em solid #004EA8;
}
<nav class="nav">
<nav class="navbar-items items-left">
<img class="logo" src="images/NELS Logo 2145C.png" alt="New England Language School Building">
<div class="nav-button navbar-link navbar-link-toggle">
<div class="hamburger"></div>
</div>
<ul class="nav-sections">
<li class="single-line-link">Home</li>
<li class="single-line-link">About</li>
<li class="single-line-link">
<div class="dropdown navbar-link">
<button class="dropbtn">Languages</button>
<div class="dropdown-content">
English
French
German
Italian
Japanese
Mandarin
Portuguese
Spanish
Request a Language
</div>
</div>
</li>
<li class="single-line-link">Corporate</li>
<li class="double-line-link">Session<br>Dates</li>
<li class="single-line-link">Events</li>
<li class="double-line-link">Language<br>Partner</li>
<li class="single-line-link">Photos</li>
<li class="single-line-link">Location</li>
<li class="single-line-link">Policies</li>
<li class="single-line-link">Contact</li>
</ul>
</nav>
</nav>
Again, this is only an issue on iPhones. Any help would be hugely appreciated as I have spent hours/days searching for and trying different solutions that don't work.
I am including the code for the nav in HTML and the CSS to make the drop down menu work. To see the full code, you can visit the website at https://www.newenglandlanguage.com/
I have tested this on Safari and the behaviour of the menu shows the same issue as you have described. To fix it just remove the overflow: hidden property from the nav element selector in your media queries.
.Main {
width: 100%;
height: 100%;
}
// css to show the navigation bar top and the image of westminister
h1 {
text-align: center;
font: italic bold 50px Georgia, serif;
}
#navbar ul {
margin: 0;
padding-left: 0;
padding-right: 0;
overflow: hidden;
background-color: black;
font-size: 15px;
width: 100%;
}
#navbar li {
float: left;
list-style-type: none;
}
li a {
display: inline;
color: #d9d9d9;
padding: 25px 20px;
text-decoration: none;
list-style-type: none;
}
.topnavbar {
text-align: right;
font: size 19px;
padding: 18px 20px;
margin-right: 10px;
float: right;
}
#searchbar {
text-align: right;
text-decoration-color: #ffffff;
font: size 15px;
padding: 10px;
padding-right: 20px;
margin-top: 18px;
margin-right: 20px;
float: right;
background: #2f3640;
transform: translate3d(-50%, 50%);
border-radius: 40px;
outline: none;
transition: 0.4s;
width: 150px;
}
.search-btn {
text-decoration: none;
}
#btn {
margin-top: 30px;
color: white;
display: flex;
}
li a:hover:not(.active) {
opacity: 1;
color: #ffffff;
}
.active {
text-decoration: none;
color: #4da6ff;
outline: none;
}
I'm trying to make this web application using AngularJS and I am fairly new to it. I am making a navigation bar for a page to start with and I think I have done the normal bar properly. However I want to also add a search bar (haven't done the functioning yet since I have no idea how to) which will appeal when the mouse hovers over the <a> tag . I'm referring to a video which will be linked below. The difference is he is not using a navigation bar instead doing it in the middle of the video
The css and html is shown below.
The video I am referring to is this: https://www.youtube.com/watch?v=v1PeTDrw6OY
PS: what I want to do is include the icon inside the gray padding area so I can set the padding to zero and it would have the icon inside the padding alone and on hover I could expand the search bar field and let the user type. Any input regarding this is highly appreciated. Thank you
You need to have a common parent element to make it easier on yourself. With your HTML the most straightforward way would be to include the <a> into the <li>, instead of having it after. So turn this
<li><input type="text" id="searchbar" placeholder="Search Here"> </li>
<a class="search-btn" href="#"> <i id="btn" class="fas fa-search"></i> </a>
Into this:
<li>
<input type="text" id="searchbar" placeholder="Search Here">
<a class="search-btn" href="#"> <i id="btn" class="fa fa-search"></i> </a>
</li>
Then you can use position: absolute and easily place the icon where you want by adding this CSS:
li {
position: relative;
}
li input + a {
position: absolute;
top: 4px; /* change this */
left: 5px; /* change this */
}
using search-bar class, you can get what you want
.Main {
width: 100%;
height: 100%;
}
// css to show the navigation bar top and the image of westminister
h1 {
text-align: center;
font: italic bold 50px Georgia, serif;
}
#navbar ul {
margin: 0;
padding-left: 0;
padding-right: 0;
overflow: hidden;
background-color: black;
font-size: 15px;
width: 100%;
}
#navbar li {
float: left;
list-style-type: none;
}
li a {
display: inline;
color: #d9d9d9;
padding: 25px 20px;
text-decoration: none;
list-style-type: none;
}
.topnavbar {
text-align: right;
font: size 19px;
padding: 18px 20px;
margin-right: 10px;
float: right;
}
#searchbar {
text-align: left;
text-decoration-color: #ffffff;
font: size 15px;
padding: 10px;
padding-right: 20px;
float: right;
background: #2f3640;
transform: translate3d(-50%, 50%);
border-radius: 40px;
outline: none;
transition: 0.4s;
width: 150px;
}
.search-btn {
text-decoration: none;
background: transparent;
outline: 0;
border: 0;
color: #fff;
position: absolute;
right: 10px;
top: 38px;
bottom: 0;
margin: auto 0;
line-height: 100%;
display: inline-block;
line-height: 100%;
display: block;
height: 22px;
}
li a:hover:not(.active) {
opacity: 1;
color: #ffffff;
}
.active {
text-decoration: none;
color: #4da6ff;
outline: none;
}
.search-bar{
position: relative;
}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<div class="Main">
<div id="navbar">
<ul>
<li><img src="assets/img/xyz.png" alt="logo" width="180px" height="80px" style="float:left"></li>
<li> <a class="topnavbar active" [routerLink]="['page6']">Display Items </a> </li>
<li> <a class="topnavbar" [routerLink]="['page2']">Add Items </a> </li>
<li> <a class="topnavbar" [routerLink]="['page3']"> Delete Items </a> </li>
<li> <a class="topnavbar" [routerLink]="['page4']">Borrow Items </a> </li>
<li> <a class="topnavbar" [routerLink]="['page5']">Return Items</a> </li>
<li> <a class="topnavbar" [routerLink]="['page6']">Generate Report </a> </li>
<li> <a class="topnavbar" [routerLink]="['page6']">Generate Report </a> </li>
<li>
<div class="search-bar">
<input type="text" id="searchbar" placeholder="Search Here">
<button class="search-btn"><i id="btn" class="fas fa-search"></i></button>
</div>
</li>
</ul>
</div>
</div>
I have tried applying a Overflow: hidden/auto to varios classes of CSS.
I have tried applying a Clear: both to various CSS sections as well, so far no go.
I am just unsure on how to fix this.
https://codepen.io/Tsukiyono/pen/KXLZbP
If you change the Codepen to a mobile size, the hamburger menu pops up, when clicked there is a small grey box that should cover the whole screen, but it only goes about 50px down or so. It used to work correctly, but I made a change at some point and something broke and now I cant seem to fix it.
If one of the above options is the correct fix, could someone help me figure out the correct CSS (or combination of CSS) that I can add it to to fix my issue?
//Variables
var overlay = document.querySelector(".fa-bars");
var times = document.querySelector(".fa-times");
var menuSelect = document.querySelector("#hiddenNav")
var quoteFade = document.querySelector(".toggleOff")
var navScroll = document.querySelector("#navbar");
//Hamburger Menu Display Overlay
overlay.addEventListener("click", function(){
if (times.classList.contains("closed")){
//toggle Display property for hiddenNav
menuSelect.classList.add("toggle");
//FadeOut Hamburger
overlay.classList.add("closed");
//FadeIn X Menu
times.classList.remove("closed");
}
})
//Closes Out Overlay Display Menu
times.addEventListener("click", function(){
if (overlay.classList.contains("closed")){
//toggle Display Property for hiddenNav
menuSelect.classList.remove("toggle");
//FadeIn Hamburger
overlay.classList.remove("closed");
//FadOut X Menu
times.classList.add("closed");
}
})
//Loads text after the page loads with transition
function onStart() {
quoteFade.classList.add("toggleOn");
quoteFade.classList.remove("toggleOff");
}
window.onload = onStart;
//Change Navbar Opacity on Scroll
window.onscroll = function (){
if (document.body.scrollTop >= 100){
navScroll.classList.add("colored");
navScroll.classList.remove("transparent");
alert("working");
}
else {
navScroll.classList.add("transparent");
navScroll.classList.remove("colored");
}
};
/* Simple Resets */
html, body {
background-color: #fff;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
font-family: 'Raleway', sans-serif;
}
/*------------------------------------------------------------------
[1. NavBar - Primary]
*/
div.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 30px;
}
nav {
float: left;
width: 100%;
outline: none;
position: fixed;
}
/* used to make Navbar change color on Scroll */
nav.transparent {
background-color: transparent;
}
nav.colored {
background-color: white;
transition: 1s;
}
nav h1 {
padding-left: .5em;
color: #000;
text-transform: uppercase;
float: left;
font-size: 1.5em;
}
nav ul {
list-style-type: none;
padding: 0;
margin: 10px;
float: right;
}
nav ul li {
display: inline-block;
}
nav ul li:hover {
font-weight: bold;
text-decoration: underline;
transition: .7s;
}
nav ul li a {
padding: 1em;
color: #000;
display: block;
text-transform: uppercase;
text-decoration: none;
}
i.fa-bars {
color: blue;
float: right;
font-size: 28px;
padding: 5px;
margin-top: 20px;
display: none;
}
/*------------------------------------------------------------------
[1.5 NavBar - Hidden Overlay]
*/
div.overlay {
background-color: rgba(0,0,0,0.7);
position: absolute;
width: 100%;
height: 100%;
display: none;
transition: .7s;
}
/* Allows Hidden Nav to be displayed */
div.overlay.toggle {
display: block;
}
i.fa-times {
color: #fff;
font-size: 2.5em;
padding: 5px;
position: absolute;
right: 30px;
top: 20px;
display: block;
}
/* Shuts down the FA Icons on click with JS */
i.fa-bars.closed,
i.fa-times.closed {
display: none;
transition: .7s;
}
div.overlay ul{
padding: 0;
margin: 100px 0 0 0;
display: block;
width: 100%;
text-align: center;
}
div.overlay ul li {
display: block;
}
div.overlay ul li a {
font-size: 1.25em;
padding: 1em;
color: #fff;
display: block;
text-transform: uppercase;
text-decoration: none;
}
/*------------------------------------------------------------------
[2 Hero Image]
*/
.hero-section {
width: 100%;
height: 50em;
margin: auto;
background: url("img/alexandru-tudorache-17852.jpg") no-repeat 50% 50%;
display: table;
top: 0;
background-size: cover;
}
/*------------------------------------------------------------------
[2.5 Quote Text]
*/
#quoteBox .container-fluid {
padding-top: 9em;
text-align: center;
}
.toggleOn {
opacity: 1;
transition: 3s;
}
.toggleOff{
opacity: 0;
}
#content {
height: 35em;
}
p#quote {
max-width: 25em;
color: white;
text-shadow: 0 0 3px #000;
font-family: "Adobe Caslon Pro", "Hoefler Text", Georgia, Garamond, Times, serif;
letter-spacing: 0.1em;
text-align: center;
margin: 40px auto;
text-transform: lowercase;
line-height: 145%;
font-size: 2.1em;
font-variant: small-caps;
}
/*------------------------------------------------------------------
[9 Footer]
*/
footer {
background-color: #000;
height: 6em;
width: 100%;
margin: 0;
padding: 0;
}
footer p {
margin-bottom: .5em;
}
.social-media-contact {
color: white;
text-align: center;
}
.social-media-contact i {
padding: 0 .5em;
margin: 0px 10px;
}
.social-media-contact .fa {
font-size: 1.5em;
}
.footerNav ul {
text-transform: uppercase;
list-style-type: none;
margin-right: 3em;
}
.footerNav ul li {
display: inline;
color: #fff;
}
.footerNav ul li a {
color: #fff;
padding: .4em;
text-decoration: none;
}
.footerNav li:not(:first-child):before {
content: "|";
padding: .3em;
}
/*------------------------------------------------------------------
[10 Media Queries]
*/
/* Navbar */
#media all and (max-width: 768px){
nav ul {
display: none;
}
i.fa-bars {
display: block;
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Marlee Branding Site</title>
<!-- Google Fonts - RaleWay -->
<link href="https://fonts.googleapis.com/css?family=Raleway:400,700" rel="stylesheet">
<!--Font Awesome -->
<link rel="stylesheet" href="assets/fa/css/font-awesome.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- Navbar -->
<nav class="transparent" id="navbar">
<!-- Collapsed Navbar -->
<div class="overlay" id="hiddenNav">
<div class="container">
<i class="fa fa-times closed" aria-hidden="true"></i>
<ul class="nav">
<li>Home</li>
<li>About</li>
<li>Now</li>
<li>Blog</li>
<li>Contact</li>
</ul> <!-- End Collapse Nav -->
</div>
</div>
<!-- Standard Navbar -->
<div class="container" id="navbar">
<h1>Logo</h1>
<ul class="nav">
<li>Home</li>
<li>About</li>
<li>Now</li>
<li>Blog</li>
<li>Contact</li>
</ul> <!-- End Nav -->
<i class="fa fa-bars" aria-hidden="true"></i>
</div> <!-- End Container -->
</nav><!-- End Nav -->
<!-- Hero Image and Quote -->
<section class="hero-section">
<div class="hero-image">
<div id="quoteBox">
<div class="container-fluid full toggleOff">
<div id="content">
<p id="quote">"Action is the foundational key to all success"
<br> — Pablo Picasso</p>
</div>
</div>
</div>
</div>
</section>
<footer>
<div class="social-media-contact container">
<p>Connect With Me</p>
<i class="fa fa-facebook-official" aria-hidden="true"></i>
<i class="fa fa-linkedin" aria-hidden="true"></i>
<i class="fa fa-instagram" aria-hidden="true"></i>
<i class="fa fa-envelope" aria-hidden="true"></i>
<div class="footerNav">
<ul>
<li>Home</li>
<li>About</li>
<li>Now</li>
<li>Blog</li>
<li>Contact</li>
</ul>
</div>
</div>
</footer>
<!-- Custom JS -->
<script src="scripts.js"></script>
</body>
</html>
This is because of this CSS rule:
div.overlay {
height: 100%;
}
Removing this makes it work:
Note: It's not because of overflow, but just limited in height.
A better alternative would be using min-height (thanks to G-Cyr):
div.overlay {
min-height: 100%;
}