I am in the process of creating my first website, and I am inspired by the Contact page design on this site(). Everything looks great until the screen size drops below 1000px - at that point, my button shifts to the right side and leaves some empty space on the left side of the site. While it is not fully responsive, it remains centered. Below are excerpts from my HTML and CSS:
body {
margin: 0;
padding: 0;
background-color: #f1f1f1;
}
.topper-header {
padding-top: 50px;
text-align: center;
font-size: 250%;
font-weight: 25;
text-decoration: underline cyan;
}
.container {
overflow: hidden;
margin: auto;
}
#part4 {
display: flex;
justify-content: center;
align-items: center;
background-color: #f1f1f1;
padding-bottom: 100px;
}
.place-name {
text-align: center;
padding-right: 200px;
}
.row1 {
font-size: 15px;
margin-left: 20px;
width: 230px;
height: 30px;
border-style: groove;
border-radius: 3px;
}
.row2 {
margin-top: 15px;
border-radius: 3px;
font-size: 15px;
height: 30px;
width: 490px;
float: right;
border-style: groove;
}
.row3 {
margin-top: 15px;
border-radius: 3px;
border-style: groove;
font-size: 15px;
height: 100px;
width: 490px;
float: right;
}
#contact-input {
margin-left: 50px;
border-radius: 3px;
}
.row4 {
font-weight: 10;
border-radius: 3px;
background-color: #00ced1;
font-size: 20px;
float: right;
padding-right: 192px;
border-radius: 3px;
padding-left: 192px;
padding-top: 10px;
padding-bottom: 10px;
margin-top: 140px;
margin-right: -500px;
}
<section id="part4">
<div class="container">
<h1 class="topper-header">CONTACT</h1>
<div id="contact-input">
<div class="first-row">
<span class="place-name">Zagatala,Zagatala City,Azerbaijan</span>
<input class="row1" type="text" placeholder="Name" required>
<input class="row1" type="text" placeholder="Phone">
</div>
<div class="second-row">
<input class="row2" type="email" placeholder="Email address">
</div>
<div class="third-row">
<textarea class="row3" placeholder="Message"></textarea>
<button class="row4">CONTACT US</button>
</div>
</div>
</div>
</section>