0

    <Form>
      <Row>
        <Col></Col>
        <Col>
          <h4>Demo Login</h4>
          <Form.Group controlId="formGroupEmail">
            <Form.Label>Email address</Form.Label>
            <Form.Control type="email" placeholder="Enter email" />
          </Form.Group>
          <Form.Group controlId="formGroupPassword">
            <Form.Label>Password</Form.Label>
            <Form.Control type="password" placeholder="Password" />
          </Form.Group>
          <Button variant="primary" type="submit">
            Login In
          </Button>
        </Col>
        <Col></Col>
      </Row>
    </Form>

How can I center this row on the screen?. The current items or columns are centered but I can't seem to find a way to center the row itself. I tried adding an inline style of 'align-items: enter' but that doesn't seem to work. Not even sure if I centered the columns correctly as well.

1 Answer 1

1

Try adding: className="align-items-end" to the row component and see if that works.

Sign up to request clarification or add additional context in comments.

2 Comments

I tried adding classes as well but that doesnt seem to work.
Hmm, try wrapping the code inside of the form component into a Container.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.