Embedded iframe video overlap the fixed navbar while Scrolling - html

I'm a complete beginner in programming. Currently working on a Product landing page. I embedded a video from youtube using an iframe and made my navbar fixed at the top. While scrolling down the video is sliding over the navbar. What should I do to make the video scroll down the navbar like the rest of the page content?
Here is the code of HTML file:
<div class="logo">
<img id="header-img" src="http://www.logodust.com/img/free/logo2.png" alt="Company Logo" title="comapany logo">
<h1>
Pilot - Capless Since 1984
</h1>
</div>
<div class="menu">
<ul>
<li>
<a class="nav-link" href="#container">Home</a>
</li>
<li>
<a class="nav-link" href="#aboutUs">About Us</a>
</li>
<li>
<a class="nav-link" href="#products">Products</a>
</li>
<li>
<a class="nav-link" href="#contact-info">Contact Us</a>
</li>
</ul>
</div>
</nav>
</header>
<div class="container">
<section class="videoWrapper">
<iframe id="video" width="600" height="340" src="https://www.youtube.com/embed/l__LJ8NF6eQ" frameborder="0"
allow="autoplay; encrypted-media" allowfullscreen ></iframe>
</section>
</div>
CSS code of navbar:
#header {
position: fixed;
top: 0;
left: 0;
margin: auto;
width: 100%;
}
#nav-bar {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #05386B;
color: #EDF5E1;
}
.logo {
margin-left: 25px;
}
.logo #header-img {
float: left;
width: 50px;
height: 50px;
}
.logo h1 {
font-family: 'Pacifico', cursive;
font-size: 30px;
float: right;
position: relative;
top: 5px;
left: 10px;
}
.menu {
display: flex;
align-items: center;
}
.menu ul {
list-style: none;
display: flex;
justify-content: flex-end;
align-items: center;
}
.menu li {
padding: 15px;
margin-right: 30px;
font-size: 25px;
}
CSS code for iframe:
.videoWrapper {
position: relative;
padding-bottom: 35%;
height: 0;
padding-top: 20px;
overflow: hidden;
}
.videoWrapper iframe {
border: 5px solid #05386B;
position: absolute;
top: 5em;
bottom: 2em;
left: 0;
right: 0;
margin: auto;
}
Thanks in advance

z-index on Header And Video
You have missing code <header> in your above code. Also, there is no ID for the header as it's not there, so I've added the missing code and added the header style as the CSS HTML element header.
I've added a z-index of 0 to .videoWrapper iframe and a z-index of 1 to header I also added a light grey background to your header so you can see the result better.
What is a z-index?
The z-index is how you determine the layer order in the box model of HTML. The higher the number, the higher on top it is.
Hope this helps and good luck with your project :)
<style>
header {
position: fixed;
top: 0;
left: 0;
margin: auto;
width: 100%;
z-index:1;
background:#ddd;
}
#nav-bar {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #05386B;
color: #EDF5E1;
}
.logo {
margin-left: 25px;
}
.logo #header-img {
float: left;
width: 50px;
height: 50px;
}
.logo h1 {
font-family: 'Pacifico', cursive;
font-size: 30px;
float: right;
position: relative;
top: 5px;
left: 10px;
}
.menu {
display: flex;
align-items: center;
}
.menu ul {
list-style: none;
display: flex;
justify-content: flex-end;
align-items: center;
}
.menu li {
padding: 15px;
margin-right: 30px;
font-size: 25px;
}
.videoWrapper {
position: relative;
padding-bottom: 35%;
height: 0;
padding-top: 20px;
overflow: hidden;
}
.videoWrapper iframe {
border: 5px solid #05386B;
position: absolute;
top: 5em;
bottom: 2em;
left: 0;
right: 0;
margin: auto;
z-index:0;
}
</style>
<header>
<div class="logo">
<img id="header-img" src="http://www.logodust.com/img/free/logo2.png" alt="Company Logo" title="comapany logo">
<h1>
Pilot - Capless Since 1984
</h1>
</div>
<div class="menu">
<ul>
<li>
<a class="nav-link" href="#container">Home</a>
</li>
<li>
<a class="nav-link" href="#aboutUs">About Us</a>
</li>
<li>
<a class="nav-link" href="#products">Products</a>
</li>
<li>
<a class="nav-link" href="#contact-info">Contact Us</a>
</li>
</ul>
</div>
</nav>
</header>
<div class="container">
<section class="videoWrapper">
<iframe id="video" width="600" height="340" src="https://www.youtube.com/embed/l__LJ8NF6eQ" frameborder="0"
allow="autoplay; encrypted-media" allowfullscreen ></iframe>
</section>
</div>

In your CSS, add z-index property. Here is a reference for this proprety.
#header {
position: fixed;
top: 0;
left: 0;
z-index: 99;
margin: auto;
width: 100%;
}

Related

Padding not working properly for the body element

I'm trying to give my self some extra space to work with at the bottom of the site by adding bottom-padding: 50px; to the body in CSS but for some reason it does not add anything. I've seen people do this to make the page to a scrollable length but for me it literally does nothing no matter what.
This is the code so far:
body {
margin: 0px;
padding-bottom: 500px;
}
header {
height: 60px;
position: fixed;
top: 0;
left: 0;
right: 0;
background-color: white;
}
.nav-list {
display: flex;
justify-content: flex-end;
align-items: center;
}
.nav-item {
list-style: none;
margin-right: 25px;
}
.nav-item a {
font-family: poppins, arial;
text-decoration: none;
color: black;
}
.nav-item:first-child {
margin-right: auto;
font-size: 16px;
}
.project-button {
height: 40px;
width: 100px;
border: none;
border-radius: 20px;
background-color: #86c232;
}
.projects-link {
font-size: 16px;
}
<body>
<header>
<nav>
<ul class="nav-list">
<li class="nav-item">
<strong> Tiam Nazari </strong>
</li>
<li class="nav-item">
Home
</li>
<li class="nav-item">
Contact
</li>
<li class="nav-item">
<button class="project-button">
<a class="projects-link" href="">Projects</a>
</button>
</li>
</ul>
</nav>
</header>
</body>
The padding is working, you just don't have any content. Height controls the actual height of the element (basically the distance from the outermost edges of the container) whereas padding controls the distance between the content and the edges.
If you want space, add a static height and then remove it once all of your content is in. If you still want white space vertically or horizontally once the content is in, then use padding.
body {
margin: 0px;
}
section.first {
height: 800px;
background-color: orange;
padding-top: 4em;
}
section:not(.first) {
background-color: pink;
height: 600px;
}
header {
height: 60px;
position: fixed;
top: 0;
left: 0;
right: 0;
background-color: white;
}
.nav-list {
display: flex;
justify-content: flex-end;
align-items: center;
}
.nav-item {
list-style: none;
margin-right: 25px;
}
.nav-item a {
font-family: poppins, arial;
text-decoration: none;
color: black;
}
.nav-item:first-child {
margin-right: auto;
font-size: 16px;
}
.project-button {
height: 40px;
width: 100px;
border: none;
border-radius: 20px;
background-color: #86c232;
}
.projects-link {
font-size: 16px;
}
<body>
<header>
<nav>
<ul class="nav-list">
<li class="nav-item">
<strong> Tiam Nazari </strong>
</li>
<li class="nav-item">
Home
</li>
<li class="nav-item">
Contact
</li>
<li class="nav-item">
<button class="project-button">
<a class="projects-link" href="">Projects</a>
</button>
</li>
</ul>
</nav>
</header>
<section class="first">section 1</section>
<section>section 2</section>
</body>
It is working for me. Use background-color: red; to see how the body grows. Make sure you're connecting the documents correctly.

Cannot Get Text to go to the Top of Page

I cannot get the text for navigation to display inline and in the grey bar at the top of the page. I am guessing there is some type of problem with my CSS. Before I had the text included with the class="box" and the formatting was working, but the buttons wouldn't work, so I created a new div class="new" so the buttons would work.
HTML:
<div class="box-contents">
<img src="../images/LOGO.png" alt="Stephen Crawford Photography Logo">
</div>
<div class="box">
</div>
<div class="new">
<nav>
<ul>
<li class="button"><a class="button-text" href="portfolio.html">portfolio</a></li>
<li class="button"><a class="button-text" href="../html/about.html">about</a></li>
<li class="button"><a class="button-text" href="../html/contact.html">contact</a></li>
</ul>
</nav>
</div>
CSS:
#charset "utf-8";
/* CSS Document */
body{
margin: 0;
padding: 0;
font-size: 100%;
}
.box {
width: auto;
height: 120px;
background: grey;
overflow: hidden;
opacity: 0.85;
position: relative;
z-index: 3;
}
.box-contents {
margin: auto;
width: 100%;
overflow: hidden;
position: absolute;
opacity: 1 !important;
z-index: 4;
}
.new ul{
font-family: 'Roboto Condensed', sans-serif;
font-weight: lighter;
letter-spacing: 2px;
font-size: 2em;
margin-top: 0;
padding-top: 25px;
float: right;
margin-right: 100px;
position: relative;
list-style-type: none;
margin: 0;
padding: 0;
display: inline;
z-index: 99;
}
a{
text-decoration: none;
color: inherit;
}
img{
display: block;
float: left;
width: 150px;
margin: 10px 2%;
}
.images{
display: block;
width: 800px;
float: inherit;
margin: auto;
padding-bottom: 20px;
padding-top: 20px;
}
The picture below shows the formatting issues
The most appropriate approach is to contain your logo and navigation links within your <nav> element. Right now they're broken out into separate elements which will cause them to stack. Recently, flexbox has become the best solution for situations like this. You'll be flexing your nav container and the unordered list inside. The margin property on the ul has left set to auto, which will push the navigation items to the right.
I've removed all of the unnecessary elements since we really just need <nav>. Hopefully this helps. I've included only the relevant CSS to give you a better understanding of what is happening.
nav {
display: flex;
align-items: center;
background-color: grey;
}
nav ul {
display: flex;
margin: 0 0 0 auto;
list-style-type: none;
}
nav ul li {
padding-right: 10px;
}
<nav>
<img src="//placehold.it/150x50" alt="Stephen Crawford Photography Logo">
<ul>
<li class="button"><a class="button-text" href="portfolio.html">portfolio</a></li>
<li class="button"><a class="button-text" href="../html/about.html">about</a></li>
<li class="button"><a class="button-text" href="../html/contact.html">contact</a></li>
</ul>
</nav>
Add this css to your code and <div class="new"> //content </div> inside <div class="box"> </div> like so
.new ul li{
display: inline-block;
}
body{
margin: 0;
padding: 0;
font-size: 100%;
}
.box {
width: auto;
height: 120px;
background: grey;
overflow: hidden;
opacity: 0.85;
position: relative;
z-index: 3;
}
.box-contents {
margin: auto;
width: 100%;
overflow: hidden;
position: absolute;
opacity: 1 !important;
z-index: 4;
}
.new ul{
font-family: 'Roboto Condensed', sans-serif;
font-weight: lighter;
letter-spacing: 2px;
font-size: 2em;
margin-top: 0;
padding-top: 25px;
float: right;
margin-right: 100px;
position: relative;
list-style-type: none;
margin: 0;
padding: 0;
display: inline;
z-index: 99;
}
.new ul li{
display: inline-block;
}
a{
text-decoration: none;
color: inherit;
}
img{
display: block;
float: left;
width: 150px;
margin: 10px 2%;
}
.images{
display: block;
width: 800px;
float: inherit;
margin: auto;
padding-bottom: 20px;
padding-top: 20px;
}
<body>
<div class="box-contents">
<img src="../images/LOGO.png" alt="Stephen Crawford Photography Logo">
</div>
<div class="box">
<div class="new">
<nav>
<ul>
<li class="button"><a class="button-text" href="portfolio.html">portfolio</a></li>
<li class="button"><a class="button-text" href="../html/about.html">about</a></li>
<li class="button"><a class="button-text" href="../html/contact.html">contact</a></li>
</ul>
</nav>
</div>
</div>
<div>
<img class="images" src="../images/DSC_7997-Edit.jpg" alt="Trevi Fountain, Rome">
<img class="images" src="../images/DSC_1195.jpg" alt="Lake Hartwell">
<img class="images" src="../images/DSC_7564-Edit.jpg" alt="Cinque Terre">
<img class="images" src="../images/_DSC4277.jpg" alt="Park City">
<img class="images" src="../images/LAC_6060.jpg" alt="Toccoa Falls">
<img class="images" src="../images/DSC_7547-Edit.jpg" alt="Cinque Terre">
<img class="images" src="../images/_DSC8776.jpg" alt="Campfire">
<img class="images" src="../images/_DSC2203-Edit.jpg" alt="Milkyway">
<img class="images" src="../images/_DSC8094-Edit.jpg" alt="Lake Hartwell">
</div>
</body>
Put your div with class new in div with class box
<div class="box">
<div class="new">...</div>
</div>
and then change your css by replacing .new ul with .new li
.new li{
...
}

add a div between header and footer that takes up rest of the view height

I am trying to add a div between the header and footer. Both are flex boxes, however the div in between (which in the end needs to be a slider) does not get positioned well. I am trying to get the header on top and the slider to fill up the remaining space of the view height. Only on the scroll it should show the footer (and eventually other div's as well). Somehow I have the feeling flex box is not working correctly..
Basically the same effect as this website: ArsThanea.
Another problem that I have when opening the JSFiddle is that the header and footer do not take the complete width of the view box, although the div does. When running the html and css in the browser using Gulp / Jekyll it works and it takes up the complete width.
header {
height: 130px;
background: white;
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-direction: row;
flex-direction: row;
width: 100%;
}
header .logo img {
height: 73px;
width: 146px;
padding-left: 60px;
}
header p {
text-transform: uppercase;
font-family: 'StratumNo1';
font-size: 14px;
margin: 0;
padding-left: 50px;
}
header .site-nav {
margin-left: auto;
}
header .site-nav ul {
list-style: none;
margin: 0;
}
header .site-nav ul li {
display: inline;
font-family: 'StratumNo1';
color: black;
margin: 10px;
text-transform: uppercase;
font-size: 14px;
}
header .site-nav ul li a {
text-decoration: none;
color: black;
}
header .site-nav ul li a:hover {
text-decoration: underline;
}
header .site-nav ul li a:first-child {
margin: 0px 10px 0 0;
}
header .search-form {
width: 300px;
height: 20px;
margin-left: 10px;
}
header .search-form .search-input {
width: 240px;
border-bottom: black 1px solid;
border-left: 0;
border-right: 0;
border-top: 0;
font-family: 'StratumNo1';
font-size: 14px;
}
header .search-form .search-input:focus {
outline: 0;
}
.footer-lockup {
height: 100px;
background-color: #1d1c1c;
width: 100%;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: row;
flex-direction: row;
-ms-flex-pack: justify;
justify-content: space-between;
-ms-flex-align: center;
align-items: center;
position: relative;
}
.footer-lockup .copyright {
margin: 0;
color: white;
font-size: 14px;
font-family: 'Open Sans Light';
margin-left: 60px;
color: #4d4c4c;
width: auto;
}
.footer-lockup ul {
list-style: none;
margin-right: 60px;
padding: 0;
}
.footer-lockup ul li {
display: inline;
font-family: 'Open Sans Light';
font-size: 14px;
margin: 10px;
text-transform: uppercase;
}
.footer-lockup ul li:last-child {
margin-right: 0px;
}
.footer-lockup ul li a {
text-decoration: none;
color: #4d4c4c;
}
.social-logos {
position: relative;
min-width: 200px;
display: -ms-flexbox;
display: flex;
}
.social-logos .social-logo {
height: 20px;
min-width: 20px;
margin-right: 18px;
}
.social-logos .social-logo:last-child {
margin-right: 0;
}
.social-logos .social-logo .social-media {
text-align: center;
height: 20px;
cursor: pointer;
}
.social-logos .social-logo img {
height: 20px;
}
.social-logos .social-logo img.youtube {
height: 35px;
margin-top: -7px;
}
.projects-wrapper {
display: block;
background: pink;
position: absolute;
bottom: 0;
left: 0;
right: 0;
top: 130px;
}
<header>
<div class="logo">
<img src="/assets/img/YourLogo.svg" />
</div>
<p>Your Placeholder Text</p>
<nav class="site-nav">
<ul>
<li>Home
</li>
<li>About Us
</li>
<li>Services
</li>
<li>Work
</li>
<li>Contact
</li>
</ul>
</nav>
<form class="search-form">
<input placeholder="What are you looking for?" type="search" name="search-input" class="search-input" />
</form>
</header>
<div class="projects-wrapper"></div>
<footer>
<div class="footer-lockup">
<p class="copyright">© 2016 “Your Company Name” All rights reserved</p>
<div class="social-logos">
<div class="social-logo">
<div class="social-media">
<img src="/assets/img/behance-icon.svg" />
</div>
</div>
<div class="social-logo">
<div class="social-media">
<img src="/assets/img/facebook-icon.svg" />
</div>
</div>
<div class="social-logo">
<div class="social-media">
<img src="/assets/img/linkedin-icon.svg" />
</div>
</div>
<div class="social-logo">
<div class="social-media">
<img src="/assets/img/twitter-icon.svg" />
</div>
</div>
<div class="social-logo">
<div class="social-media">
<img src="/assets/img/youtube-icon.svg" class="youtube" />
</div>
</div>
</div>
<ul>
<li>Home
</li>
<li>About Us
</li>
<li>Services
</li>
<li>Work
</li>
<li>Contact
</li>
</ul>
</footer>
DEMO: JSFiddle
Taking a look at your Fiddle, there are many improvements you can make to your markup & CSS, but coming to your issue first, the reason why its not sliding down as expected is this :
position: absolute
you added this to your main div which should go in between .projects-wrapper. First thing I would say is make this a flex as well instead of block element.
Secondly, add a wrapper to your entire project body & Make that flex. like so
<div class="wrapper"> //this should be flex
<header>..</header> //this "could" be flex depending on its contents
<div class="projects-wrapper"></div>
<footer>...</footer> //this "could" be flex depending on its contents
</div>
let me know if you are facing any other problems
I made code for You, please have a look, and tell mi is it good for You.
fiddle
I use calc() to do that
Use 100vh to get the 100% view-port height and subtract the height of header and footer.
min-height: calc(100vh - 50px);
where 50px is the height of header+footer.
partial support for ie

Can't get rid of white space between container & footer

I am making a website for my friend, and I am currently having two problems that I can't seem to solve:
I can't seem to get rid of the white space that exists between the main container and the footer. There is a small strip of white that runs from the bottom of the background image to the footer.
When the browser window is shrunk (especially to half the width of the screen) white space appears after the footer.
Can anyone help me please? Thanks!
body {
margin: 0px;
font-size: 62.5%;
padding: 0px;
}
header {
width: 100%;
height: 90px;
background-color: #000000;
}
#logo_home {
position: relative;
float: left;
left: 5%;
width: 20%;
top: 7.5px;
}
#logo {
height: 75px;
width: 300px;
}
nav {
position: relative;
float: right;
right: 5%;
width: 35%;
height: 50px;
top: 20px;
}
ul {
margin-top: 0px;
margin-bottom: 0px;
position: relative;
top: 6.5px;
}
li {
display: inline-block;
margin-left: 2.5%;
margin-right: 2.5%;
position: relative;
list-style-type: none;
padding-top: 0px;
}
.nav_link {
font-family: 'PT-Sans', sans-serif;
color: #FFFFFF;
font-size: 1.2em;
text-transform: uppercase;
line-height: 37px !important;
text-decoration: none;
}
.nav_link:link {
color: #ffffff;
}
.nav_link:visited {
color: #ffffff;
}
.nav_link:hover {
color: #dddddd;
}
#video_container {
position: relative;
padding-bottom: 56.25%;
padding-top: 30px;
height: 0;
overflow: hidden;
}
#video_container iframe,
.video-container object,
.video-container embed {
position: absolute;
top: 100px;
left: 17.5%;
width: 65%;
height: 65%;
}
#main_container {
background-image: url("../images/background.jpg");
background-size: cover;
margin: 0px;
}
footer {
background-color: #000000;
height: 50px;
width: 100%;
margin: 0px;
}
.copyright {
color: white;
font-family: 'PT-Sans', sans-serif;
font-size: 1.2em;
position: relative;
text-align: center;
top: 15px;
}
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="noindex, nofollow, noarchive" />
<link href="css/stylesheet.css" type="text/css" rel="stylesheet" />
<title>Hyperdog Productions</title>
</head>
<body>
<header>
<div id="logo_home">
<a href="index.html" title="Home">
<img id="logo" src="images/logo.jpg" alt="logo">
</a>
</div>
<nav>
<ul>
<li><a class="nav_link" id="about" href="about.html" title="About">About</a>
</li>
<li><a class="nav_link" id="short_films" href="short_films.html" title="Short Films">Short Films</a>
</li>
<li><a class="nav_link" id="cast_crew" href="cast_crew.html" title="Cast/Crew">Cast/Crew</a>
</li>
<li><a class="nav_link" id="gallery" href="gallery.html" title="Gallery">Gallery</a>
</li>
<li><a class="nav_link" id="links" href="links.html" title="Links">Links</a>
</li>
<li><a class="nav_link" id="contact_us" href="contact_us.html" title="Contact Us">Contact Us</a>
</li>
</ul>
</nav>
</header>
<div id="main_container">
<div id="video_container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/EuIXJIp8f6U" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<footer>
<p class="copyright">Copyright © 2016. All Rights Reserved.</p>
</footer>
</body>
</html>
It's probably the default top and bottom margin on the <p> in the footer, reset that and see.
.copyright {
margin: 0;
}

stop two columns from overlapping when resizing

I am new to CSS and have been trying to build a 2-column website. The code is here: JSFiddle. There is a left-side menu with a right-side content area. If the window is large enough, there is no problem with the layout. However, when resizing the window to a narrow one, the content overflows to the menu area and I don't know how to fix it without making the position fixed or absolute, which I don't want to do because I want to have a footer at the end of the page. Can someone help me fix the problem? Thank you so much!
I also apologize in advance for the long code. I don't know which part lies the problem and pasted everything
html code:
<body>
<div id="wrapper">
<div id="menunav">
<img src="images/logo.jpg" alt="siteLogo" class="centered" id="logo"/>
<nav id="nav">
<ul>
<li>Portfolio</li>
<li>About Me</li>
<li>Resume</li>
</ul>
</nav>
</div>
<div id="content">
<div class="grid3">
<article class="bucket" >
<a href="#">
<img src="images/baskerville1.jpg" alt=""/>
<div class = "img-overlay">
<h3>Monogram</h3></div>
</a>
</article>
<article class="bucket">
<a href="#">
<img src="images/Gastalt.png" alt=""/>
<div class="img-overlay">
<h3>Gastalt Composition</h3>
</div>
</a>
</article>
<article class="bucket">
<a href="#">
<img src="images/redThread.png" alt=""/>
<div class="img-overlay">
<h3>The Red Thread - A Visual Book</h3>
</div>
</a>
</article>
<article class="bucket">
<a href="#">
<img src="images/poster copy.png" alt=""/>
<div class="img-overlay">
<h3>Typographic Hierarchy</h3>
</div>
</a>
</article>
<article class="bucket">
<a href="#">
<img src="images/Spaces.png" alt=""/>
<div class="img-overlay">
<h3>Living in Two Spaces</h3>
</div>
</a>
</article>
</div>
</div>
<div id="footer">©2014</div>
</div>
</body>
css code:
#charset "UTF-8";
*{
margin:0;
}
html, body {
margin: 0;
background-color: #FFFFFF;
height: 100%;
padding: 0;
}
#wrapper {
background-color: #FFFFFF;
width: 1000px;
padding-bottom: 0px;
margin:0 auto;
position:relative;
min-height: 100%;
}
#menunav {
position: fixed;
width:180px;
padding-top:80px;
height: 100%;
display: block;
margin: 0px;
}
#logo {
width: 70%;
position: static;
}
#menunav ul {
list-style-type: none;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
}
#menunav a {
display: block;
padding-top: 8px;
padding-bottom: 8px;
margin-top: 12px;
margin-right: 0px;
margin-left: 0px;
text-align: left;
padding-left: 20px;
background-color: rgba(193,193,193,1.00);
color: rgba(0,0,0,1.00);
}
#menunav a:hover, #menunav a:active, #mainnav a:focus, #menunav a.thispage {
background-color: rgba(0,174,210,1.00);
color: rgba(255,255,255,1.00);
text-decoration: none;
}
#content {
display: block;
margin: 0 auto;
padding-left:225px;
padding-top:80px;
background-color:#fffeee;
}
.centered {
margin-left: auto;
margin-right: auto;
display: block;
margin-top: auto;
margin-bottom: auto;
}
a {
text-decoration: none;
}
.bucket {
position:relative;
float: left;
margin-left: 3.2%;
margin-bottom:30px;
}
.grid3 .bucket:nth-of-type(3n+1){
margin-left: 0;
clear: left;
}
.grid3 .bucket{
width: 31.2%;
}
.img-overlay h3 {
opacity: 1;
display: inline-block;
margin: auto;
height: 20px;
position: absolute;
top: 0;
bottom: 0;
right: 0;
left:0;
color: rgba(255,254,254,1.00);
text-align: center;
vertical-align: middle;
}
.img-overlay {
background-color: rgba(0,0,0,0.6);
bottom: 0px;
top: 0px;
opacity: 0;
overflow:hidden;
filter: alpha(opacity=0);
position: absolute;
width: 100%;
z-index: 1000;
transition: opacity 0.3s;
-webkit-transition: opacity 0.3s;
}
.bucket:hover .img-overlay {
opacity:1;
filter: alpha(opacity=100);
}
.bucket img {
width: 100%;
}
#footer{
clear:both;
text-align: center;
line-height:20px;
vertical-align: middle;
}
#media screen and (max-width:740px){
/*change 3 column to 2 column*/
.grid3 .bucket:nth-of-type(3n+1) {
margin-left: 3.2%;
clear: none;
}
.grid3 .bucket:nth-of-type(2n+1) {
margin-left: 0;
clear: left;
}
}
Set z-index:1 and set background-color: #FFFFFF; in #menunav
#menunav {
z-index: 1;
background-color: #FFFFFF;
position: fixed;
width:180px;
padding-top:80px;
height: 100%;
display: block;
margin: 0px;
}
Here it is http://jsfiddle.net/n9V3W/2/ working!!!