CSS Menyelaraskan Pusat Vertikal
.parent {
display: flex;
justify-content: center;
align-items: center;
}
Gleaming Grivet
.parent {
display: flex;
justify-content: center;
align-items: center;
}
.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;
}
text-align: center;