Hi,
I am re-doing the survey form project I already completed because I noticed that using chrome developer tools it was not responsive at all
I tested if this new version of my survey form was 100% responsive with developer tools on the 4 browsers I have on my pc: Chrome, Mozilla, Edge, and Internet Explorer
All good on almost all devices (rotated the devices too) except Samsung Galaxy Fold that in vertical the 1st <fieldset>
is not aligned in the center, same for the <button>
when I view my project with the rotated screen with Samsung Galaxy Fold, my project looks good though
I attached screenshot of this issue, how do I fix it?
Also there are slight lines between different <div>
that contain different <fieldset>
I want the <form>
to look united throughout, “border: 0;” doesn’t work
my HTML code:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<!-- header -->
<div>
<header>
<h1 id="title">freeCodeCamp Survey Form</h1>
<p id="description"><em>Thank you for taking the time to help us improve the platform</em></p>
</header>
</div>
<!--survey form -->
<div id="first-fieldset-container">
<form id="survey-form" action="https://register-demo.freecodecamp.org">
<div id="center"><fieldset id="first-fieldset">
<label id="name-label">Name<input type="text" id="name" required placeholder="enter your name"></label>
<label id="email-label">Email<input type="email" id="email" required placeholder="enter your email"></label>
<label id="number-label">Age <p class="smallerfont"> (optional)</p>
<input type="number" id="number" placeholder="age" min="1" max="99"/></label>
</div></fieldset>
</div>
<div>
<fieldset>
<label>Which option best describes your current role?</label>
<select id="dropdown">
<option value="">Select current role</option>
<option value="1">Full Time Job</option>
<option value="2">Full Time Learner</option>
</select>
</fieldset>
</div>
<div>
<fieldset>
<label>Would you recommend freeCodeCamp to a friend?</label>
<label><input class="inline" type="radio" name="marketing" value="definitely"> Definitely</label>
<label><input class="inline" type="radio" name="marketing" value="maybe"> Maybe</label>
</fieldset>
</div>
<div>
<fieldset>
<label>
What would you like to see improved?
</label> <p class="smallerfont">(check all that apply)</p>
<label>
<input class="inline" type="checkbox" value="front-end-projects"/> Front-end Projects
</label>
<label>
<input class="inline" type="checkbox" value="back-end-projects"/> Back-end Projects
</label>
<label>
<input class="inline" type="checkbox" value="data-visualization"/> Data Visualization
</label>
</fieldset>
</div>
<div>
<fieldset id="textarea-fieldset">
<label>Any comments or suggestions?
<textarea rows="5" cols="5" placeholder="Enter your comment here..."></textarea>
</label>
</fieldset>
<button type="submit" id="submit">Submit</button>
<p id="space-below-button"> </p>
</form>
</div>
</body>
</html>
My CSS code:
* {
font-family: Tahoma;
font-size: 18px;
margin-top: 1rem;
}
input , select , button {
display: block;
}
input[type="radio"], input[type="checkbox"] {
display: inline-block;
}
button {
background-color: #FFE898;
color: #F65A83;
font-family: Tahoma;
border: 0;
height: 2.5em;
width: 15em;
display: block;
font-size: 1.1rem;
margin: 0.5em auto 2em;
}
h1 , p {
text-align: center;
}
h1 {
padding-top: 3rem;
}
body {
color: white;
background-image: url(https://st.depositphotos.com/1987283/2143/i/600/depositphotos_21430303-stock-photo-a-high-resolution-bright-pink.jpg);
background-size: cover;
}
input {
margin: 0 auto;
}
input[type="number"] {
width: 4rem;
height: 3rem;
margin-left: 0.2rem;
}
.smallerfont {
display:inline-block;
margin: 1 auto;
font-style: italic;
}
label {
display: block;
margin: 0.5rem 0;
}
form {
margin: 0 auto;
width: 1.5rem;
max-width: 500px;
min-width: 300px;
}
fieldset {
width: 12rem;
border: 0;
box-sizing: border-box;
margin: 0 auto;
background-color: #F65A83;
display: block;
}
#description {
padding-bottom: 1rem;
}
div:first-of-type {
margin-bottom: -1rem;
}
input, textarea, select {
width: 100%;
}
.inline {
width: unset;
margin: 1 0 0.5em 0;
vertical-align: middle;
}
input , textarea {
border: 1px;
min-height: 2em;
}
select {
border: 1px solid;
min-height: 2em;
}
#textarea-fieldset {
margin-bottom: 1rem;
}
div {
margin: 0 auto;
max-width: 1000px;
background-color: #FF87B2;
padding-bottom: 0;
}
#space-below-button {
margin-bottom: 2rem;
}