I am a Frontend software developer who helps small to medium-sized enterprises develop web applications that solve complex problems. I utilize JavaScript and its frameworks: REACT & VUE.
Sure this works, but for only one axis.
You would have to add 'justify-content: center' also to ensure it remains centered on both x and y-axis (horizontal and vertical).
That is:
// This is absolutely centered!
div {
display:flex;
align-items:center;
justify-content: center
}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
this one work too
div{
display:flex;
align-items:center;
}
Sure this works, but for only one axis.
You would have to add 'justify-content: center' also to ensure it remains centered on both x and y-axis (horizontal and vertical).
That is:
// This is absolutely centered!
div {
display:flex;
align-items:center;
justify-content: center
}