0
How I center a image within a DIV? (html)
0
How I center a image within a DIV? (html)
0
You can use <center>...</center>
or put in CSS:
.minhaimg {
margin-left: auto;
margin-right: auto;
}
If you want to see more: https://www.w3.org/Style/Examples/007/center.pt_BR.html
Etiquette <center>
is advised against/not supported in Html5. Reference
Obs. for auto margin to work the element has to be display block with defined width
Browser other questions tagged html css
You are not signed in. Login or sign up in order to post.
use the display:flex align-items:center Justify-content:center (for the image to not leak from inside the element, you can also place an overflow:Hidden)
– Murilo Melo