If you click the link you’ll get on my codepen.io and see that I’m not that far because I’ve been trying to put space between my inputs and labels while trying to make sure they are aligned.
Here are some screenshots to make sure you understand what I’m saying because I might be a bit confusing (sorry about that) :
1 - First screenshot is what I’m aiming to do but with my own style and ofc with understanding, I’ve tried looking on google multiple websites and their code but I still couldn’t do it : https://postimg.cc/image/w962lf53x/
Hey thanks for the reply! However that’s not my problem my problem is making sure the space between the first and the second label AND input is the same again and again.
I found a fix but not using CSS just HTML :
<div id="header-content">
<div id="header">
<h1 id="title">Survey - Who are you ?</h1>
<p id="description">We'd like to know a little more about you ! :D</p><hr>
</div>
<div class="input-line">
<div class="labels">
<label for="name">* Name:</label><br>
</div>
<div class="input-spot">
<input type="text" name="name" id="name" placeholder="First/Last names" autofocus required><br>
</div>
</div>
<div class="input-line">
<div class="labels">
<label for="email">* Email adress:</label><br>
</div>
<div class="input-spot">
<input type="email" name="email" id="email" placeholder="example@mail.com"
pattern="^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$" required>
</div>
</div>
</div>
I did this instead of putting the labels in the same divs and the inputs inside the same div so that all my CSS would be applied and re-applied.
Hmm. I’ll keep that. I’m done with my project I passed all tests but it is poorly responsive and designed so I will definitly re-do it before doing my portfolio.