How do I center a form which is wrapped in a flex container? [duplicate]

Solution 1:

Your form is a flex container and flex can be horizontally center with justify-content: center; and vertically with align-items: center (If height is enough available)

Add below css and this will center the form

.form-inline {
 justify-content: center;
}