My goal is to make my div element's background color cover the full height of the browser and overlap my background image:
Desktop View
I attempted using height: 100% for the HTML selector, which did work but caused issues with the mobile view:
Mobile View
I also tried using 100vh, but encountered the same problem. At this point, I'm struggling to find a solution that works for both views.
CSS
*{
font-family: 'Source Sans Pro', sans-serif;
color: white;}
a:link{
color: white;
}
body {
padding: 0px;
margin: 0px;
background-image: url(../portfolio/images/bg-img1.jpeg);
background-size: cover;
background-repeat: no-repeat;
}
.container-shader{
background-color: rgba(54,54,56,0.8);
background-size: cover;
margin: 0 auto;
height: 100%;
width: 100%;
}
.btn{
border-style: solid;
padding-left: 30px;
padding-right: 30px;
margin-top: 10px;
text-align: center;
}
.btn-info{
background-color: rgba(0,0,0,0);
text-align: center;
}
.fig-inline{
display: inline-block;
padding-left: 30px;
padding-right: 30px;
padding-bottom: 30px;
margin: 0 auto;
}
.page-header{
color: white;
padding: 10px;
text-align: center;
}
.row{
padding-top: 50px;
}
.list-inline{
color: white;
text-transform: uppercase;
text-align: center;
margin: 0 auto;
float: none;
}
li{
display: inline-block;
list-style: none;
padding: 10px;
}
.footer{
text-align: center;
bottom: 0;
}
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8">
<meta name="author" content=">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
<link rel="stylesheet" href="../portfolio/style.css">
</head>
<body>
<div class="container-shader">
<div class="container-fluid">
<div class="page-header">
<img src="../portfolio/images/ju-logo.png" class="img-responsive">
<h6>Web Design & Development</h6>
</div>
<ul class="list-inline">
<li><a href="....">Home</a></li>
<li><a href="....">About</a></li>
<li><a href="....">Projects</a></li>
<li><a href="....">Contact</a></li>
</ul>
</div>
<div class="row">
<!-- About me col -->
<div class="fig-inline">
<figure>
<img src="../portfolio/images/avatar.png" class="img-responsive">
<p>
<a href="#" class="btn btn-info" role="button">About Me</a>
</p>
</figure>
</div>
<!-- Project col -->
<div class="fig-inline">
<figure>
<img src="../portfolio/images/monitor.png" class="img-responsive">
<p>
<a href="#" class="btn btn-info" role="button">Projects</a>
</p>
</figure>
</div>
<!-- Contact col -->
<div class="fig-inline">
<figure>
<img src="../portfolio/images/phone-call.png" class="img-responsive">
<p>
<a href="#" class="btn btn-info" role="button">Contact</a>
</p>
</figure>
</div>
</div>
<div class="footer">
<small>Copyright © 2018 Jake Ulicne </small>
<small><div>Icons made by <a href="https://www.flaticon.com/authors/gregor-cresnar" title="Gregor Cresnar">Gregor Cresnar</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div></small>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
</body>
</html>