There are 2 major concerns I have regarding this layout :
.feature_content
(with a grey background) does not adjust its height and width to different screen sizes. Currently, on large screens,.feature_content
is positioned far from the footer.- There is an unwanted horizontal scrollbar that needs to be removed regardless of the screen size.
My goal is to: make .feature_content
responsive in terms of height and eliminate the horizontal scrollbar.
For reference, you can view a FIDDLE for this issue.
Below is the relevant code :
HTML :
<div id="container">
<div id="header">Header added just for demonstration purposes</div>
<div id="content">Your content goes here
<div class="featured_content"></div>
</div>
</div>
<div id="footer">Footer here</div>
CSS :
* {
padding: 0;
margin: 0;
border: 0;
outline: 0;
}
body, html {
width:100%;
min-height: 100%;
}
div {
height:100%;
width:100%;
border:5px solid black;
}
#header {
background-color:orange;
}
#container {
background:blue;
margin: 0 auto;
position: relative;
height: auto !important;
}
#content {
background:pink;
padding-bottom: 100px;
margin: 0 auto;
position: relative;
}
#footer {
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.4);
height: 70px;
left: 0;
position: fixed;
z-index: 100000;
background:green;
}
.featured_content {
min-height: 750px;
max-height: 750px;
width:200px;
background-color:grey;
position:fixed;
margin:auto 0px;
margin-top: 150px;
}