Is there a way to center align my form in such a way that the input box and button appear in the same row? I've tried the code below, but for some reason they don't display inline. Can anyone provide a code sample to help me achieve this? Your assistance is greatly appreciated.
index.html code
<section class="sec1 container-fluid mt-3 pd-5 ">
<h2 class="mt-5">Newsletter</h2>
<p>Subscribe to this news letter to get the latest news about us</p>
<form class="form-inline mt-2" action="/actionPage.php">
<input type="email" class="form-control" id="email" placeholder="Enter email">
<button type="submit" class="btn btn-dark btn-sm">submit</button>
</form>
</section>
style.css code
.sec1{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
background: #faf8fb;
}
Output Image
https://i.stack.imgur.com/h5J7b.png
I am looking for a solution to have both the input box and button appear on the same row when the form is centered. Any suggestions would be greatly appreciated. Thank you!