I have a div with two inner child divs, im using flexbox so that they wrap underneath eachother on smaller screens.
They wrap fine, but the parent's div doesnt shrink with a max-width on it. leaving my boxshadow full sized.
any help appreciated, here's the codepen.
https://codepen.io/Middi/pen/JvLNEZ
HTML
<!--======== SOCIAL SECTION ========-->
<section id="social" class="social">
<div class="social-container">
<div class="social-container-half">
<div class="insta-header">
<h4 class="h4-display">INSTAGRAM</h4>
</div>
</div>
<div class="social-container-half">
<div class="twitter-header">
<h4 class="h4-display">TWITTER</h4>
</div>
</div>
</div>
</section>
CSS
.social-container {
max-width: 1150px;
display: flex;
flex-wrap: wrap;
justify-content: center;
margin: 0 auto;
box-shadow: 4px 4px 10px 2px rgba(black, 0.7);
position: absolute;
top: 30px;
background-color: yellow;
left: 0;
right: 0;
}
.social-container-half {
box-sizing: border-box;
width: 575px;
background-color: white;
border: 1px solid red;
}