CSS -Zentrumbild
.center {
display: block;
margin-left: auto;
margin-right: auto;
}
Unusual Unicorn
.center {
display: block;
margin-left: auto;
margin-right: auto;
}
IMG.displayed {
display: block;
margin-left: auto;
margin-right: auto }
...
<IMG class="displayed" src="..." alt="...">
.parent {
position: relative;
}
.child {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
display: flex;
align-items: center;
justify-content: center;
/* order: vertical, horizontal */
/* If you need to access this quickly, just search for "fc" */
// example 1
div { display: grid; place-items: center; }
// example 3
div{ display:flex; align-items:center; }
// example 3
div { width: 100%; margin: 0 auto; }
/* the simple solution*/
table {
text-align: center;
}