Hello, I have created a Bootstrap contact form and I am trying to center all its elements. Here is the code snippet:
.third-section > form > input{
width: 35%;
margin: auto;
margin-top: 25px;
}
.third-section > form > textarea{
width: 35%;
margin:auto;
margin-top: 20px;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<section class="third-section">
<form>
<input type="text" class="form-control" placeholder="Name" required/>
<input type="email" class="form-control" placeholder="Email" required/>
<textarea id="message" rows="4" class="form-control" placeholder="Message" required></textarea>
<input type="submit" class="btn btn-primary" value="SUBMIT"/>
</form>
</section>
SCREENSHOT
https://i.sstatic.net/xtkSz.png
The button in the screenshot is not aligned in the center. Can anyone suggest how I can achieve the desired layout? Any assistance would be greatly appreciated.
THANKS