Imagen del centro CSS
.center {
display: block;
margin-left: auto;
margin-right: auto;
}
Unusual Unicorn
.center {
display: block;
margin-left: auto;
margin-right: auto;
}
.parent {
display: flex;
justify-content: center;
align-items: center;
}
IMG.displayed {
display: block;
margin-left: auto;
margin-right: auto }
...
<IMG class="displayed" src="..." alt="...">
div.container4 {
height: 10em;
position: relative }
div.container4 p {
margin: 0;
background: yellow;
position: absolute;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%) }
element {
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
}
element {
position: absolute;
top: 0;
bottom: 0;
margin: auto 0;
}