Using divs with display:flex
I would like the two elements that are going to have to occupy 50% of the screen respectively, but I do not get it by modifying the property flex-grow
. I have tried to play a bit with the values of that property and nothing.
I currently have the code
.cabecera{
width:100%;
height:auto;
display:flex;
flex-direction:row;
justify-content: flex-start;
align-items: center;
}
.item-flex{
flex-grow: 50%; /* realizando pruebas */
}
.item-primero{background:yellow;}/*background pruebas*/
.item-second{background:blue;}/*background pruebas*/
<div class="cabecera">
<div class="item-flex item-primero">
este es mi item primero
</div>
<div class="item-flex item-second">
este es mi segundo
</div>
</div>
To achieve this, what would you have to play with the flex-basis property?