So I'm kind of a begginner and I just encountered a problem that I don't know how to solve.
Here is the code:
https://jsfiddle.net/upwaqyek/
.parent{
display: flex;
flex-wrap: wrap;
border: #000000 2px solid;
justify-content: center;
}
.parent div {
width: 300px;
height: 50px;
background-color: rgba(197, 197, 197, 0.788);
border: #000000 solid 2px;
border-radius: 10px;
margin: 10px;
transition-duration: 3s;
text-align: center;
align-items: center;
}
I can't center the text. I think it has to do with the width and height but it really doesn't move at all. The text just stays static there at the bottom of the div and doesn't do anything when I change the div height.
I want the text to be in the center of the div, both horizontally and vertically.