-1
I recently asked a question because my margin top did not push my div down, following the example in the previous question I was able to solve, but now, using the same explanation of the previous question I cannot center my content.
.side-menu-user-infos {
background: #FFF;
display: block;
height: 190px;
border-bottom: 1px solid rgb(155, 158, 162);
position: relative;
}
.side-menu-user-photo {
border-radius: 50%;
width: 30%;
height: 80px;
margin: 30px auto 0 auto;
position: relative;
box-shadow: 1px 1px 7px;
}
img {
width: 100%;
height: 100%;
}
.side-menu-user-name {
color: #374147;
margin: 15px auto 0 auto;
}
<div class="side-menu-user-infos">
<div class="side-menu-user-photo">
<img src="" alt="">
</div>
<div class="side-menu-user-name">
Fernando Munhoz
</div>
</div>
How are you getting:
How it should look:
Why my text in the "side-menu-user-name" class does not align in the center and in the "side-menu-user-photo" class I use the margin in the same way and the content centralizes??
Please do not remove the edit that adds the snippet executable. It is recommended for snippets of code that can be executed on the client side (such as HTML and CSS).
– Luiz Felipe