I've tried several tutorials online to make this image responsive with a fixed aspect ratio, but nothing seems to work.
The image is set at 900x400px and I want it to remain fully visible on smaller screens as well.
Here's the codepen link
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<div id="aboutsec1">
<div class="parallaxbg">
<div class="parallaxcontainer">
<div class="parallaxcontent">
<h1>header</h1>
"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
</div>
</div>
</div>
</div>
<section id="aboutsec2">
<div class="parallaxbg"></div>
<div class="parallaxbg2"></div>
</section>
</body>
</html>
CSS
html,body{
width:100%;
height:100%;
margin: 0;
padding: 0;
}
/* Basic Parallax Background */
.parallaxbg {
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
height: 100%;
width: 100%;
position: relative;
}
/* Basic Parallax Container */
.parallaxcontainer {
display: table;
table-layout: fixed;
width: 100%;
height: 100%;
overflow: hidden;
position: relative;
}
/* Basic Parallax Content */
.parallaxcontent {
max-width: 450px;
display: table-cell;
vertical-align: middle;
padding-left: 10%;
padding-right: 10%;
text-align: center;
}
#aboutsec1{
height: 100%;
}
/* About Page Section 1 */
#aboutsec1 .parallaxbg {
background: none;
background-color: #eeeeee;
text-align: center;
}
/* About Page Section 2 */
#aboutsec2 {
}
#aboutsec2 .parallaxbg2 {
background-color: #000000;
background-image: url('http://s16.postimg.org/k5xrwvp7p/900x400.png');
z-index: 1;
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
width: 100%;
background-size: cover;
padding-bottom: 44.444444444444%; /* 400px/900px */
}