So i am working on the survey page --> https://codepen.io/Mike-was-here123/pen/LBervq?editors=1100
I am wondering how i can align the form elements:
Is there a any tricks, especially with flexbox to make all of those elements aligned? My code for this so far is:
Line 18 HTML:
<form id="survey-form">
<p id="description">What is the camper experince?</p>
<hr style="width: 80%; margin-top: -1%;"/>
<div>
<label for="email">*Email:</label>
<input type="text" id="email" placeholder="john.doe@gmail.com" name="email" required>
</div>
<div>
<label for="email">*Name:</label>
<input type="text" id="name" placeholder="John Doe" name="name" required>
</div>
<div>
<label for="age">*Age:</label>
<input type="text" id="number" placeholder="24" name="number" required>
</div>
</form>
Line 18 CSS:
#survey-form {
background-color: rgb(242, 247, 244);
flex-direction: column;
}
#email, #name, #number {
text-align: center;
font-size: 18px;
width: 250px;
}
[for] {
font-size: 23px;
}
Line 87 CSS also:
#email, #name, #age {
text-align: center;
font-size: 13px;
width: 200px;
}
[for] {
font-size: 18px;
}
}
How could i nicely align things like in the example given? https://codepen.io/freeCodeCamp/full/VPaoNP