How to vertically center
inside the parent element with CSS?

The best approach in modern browsers is to use flexbox:

#Login {
    display: flex;
    align-items: center;
}

Some browsers will need vendor prefixes. For older browsers without flexbox support (e.g. IE 9 and lower), you’ll need to implement a fallback solution using one of the older methods.

Recommended Reading

Leave a Comment