I'm trying to make a flexbox container for some items. There is one 100% width item inside as a headline.
The container is bigger ( width ) than needed.. why ?
Here is the code:
.flex_container {
display: inline-flex;
flex-wrap: wrap;
border: 1px solid blue;
}
.flex_head {
width: 100%;
padding: 10px;
background-color: blue;
font-size: 14px;
}
.flex_item {
width: 175px;
margin: 9px;
border: 10px solid red;
background-color: red;
}
<div class="flex_container">
<div class="flex_head">Flex Head</div>
<div class="flex_item">Item</div>
<div class="flex_item">Item</div>
<div class="flex_item">Item</div>
<div class="flex_item">Item</div>
<div>