I'm currently in the process of developing a mobile-first responsive website with forms. Here is the desired mockup I need to replicate after the 769px breakpoint: https://ibb.co/LQ0Gwt7. On the other hand, here is how it should look for 769px and below: https://ibb.co/7tbDShb. However, before hitting the 769px mark, the fieldset containers seem to overflow. What could be causing this issue? For better clarity, I've outlined elements with red borders. You can see for yourself by checking out the link provided: https://ibb.co/1J9n8pW
Below is my CSS and HTML code:
* {
box-sizing: border-box;
}
body {
background: seashell;
font-family: 'Merriweather', serif;
}
.header-content {
text-align: center;
background: #29405a;
color: white;
border: 1px solid #29405a;
}
.signup {
text-align: center;
border-bottom: 2px #29405a dashed;
margin: 0 auto;
width: 90%;
}
.form {
margin: 10px auto;
width: 70%;
background: #feffff;
padding: 30px;
border-radius: 10px;
border: 1px red solid;
}
.field {
padding: 20px;
margin: 0 auto;
border: 3px red solid;
}
/*input styles*/
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
background: #e8eeef;
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03) inset;
border: none;
border-radius: 5px;
padding: 12px 0;
}
button[type="submit"] {
background: #52bab3;
color: #FFF;
padding: 10px 30px;
border: none;
border-radius: 5px;
cursor: pointer;
}
.news-input {
margin-bottom: 20px;
}
.news-input label {
margin-left: 10px;
}
.contact-input {
margin: 20px auto;
border: 1px red solid;
display: flex;
flex-wrap: wrap;
flex-direction: column;
}
.label {
margin-bottom: 10px;
}
.textarea {
display: flex;
flex-direction: column;
}
.button {
display: flex;
flex-direction: column;
}
.extra-info {
text-align: center;
...
<link href="https://fonts.googleapis.com/css?family=Merriweather&display=swap" rel="stylesheet">
</head>
<body>
<header>
<div class="header-content">
<h1>The Code Review</h1>
</div>
</header>
...
<textarea id="topics" name="user_topics"></textarea>
</div>
</fieldset>
<div class="button">
<button type="submit">Sign Up</button>
</div>
<div class="extra-info">
<p>Copyright the Code Review</p>
</div>
</form>
</body>
</html>