Would like some feedback
HTML/CSS, design, color choices anything wrong or out of place, please share.
Looking good!
Iād put the h1 ātitleā inside the div āform-outerā (without the <header>
).
Iād also give the div āform-outerā more padding, maybe 15px so it would look better at mobile widths.
Moved h1 into the form-outer and gave it more padding.
Thank you
A nice looking page @mikeben. Some things to revisit;
- in your checkboxes section a user can click on all of the labels to select except the ābipolar disorderā label.
- change the cursor to a pointer when hovering over your submit button
- in CSS you have the color property duplicated when styling your submit button. One overrides the other
- itās a nit but, if youāve ever filled out a form on-line you may have noticed that required fields have an asterisk. If the field is not required, donāt mark it as such.
Looks good.
-
You have a mismatch on the
for
attribute andid
on the age label/input. The id on the input should beage
notnumber
. -
I would stack the form a bit sooner and probably center the
textarea
(remove the float on it) at that breakpoint. -
Iād advise you to put a little more effort into your HTML formatting, it pays off in the long run.
- fixed the bipolar
- added the cursor
- removed the duplicated property
- added required and removed the asterisk where it made sense.
Thank you very much
- Since the project requires number id, changed age to number instead.
- Donāt see where the
textarea
has float. - Did try to tidy up the HTML, not sure if it is exactly what you were talking about though.
WouldnĀ“t mind the push in the right direction of what good formatting should look like.
Thanks for taking the time.
Very nice. And I just noticed this in your HTML;
<ul style="list-style-type: none;">
Do your styling in CSS.
-
Yep, sorry my bad.
-
Right, the float is on the
.answer
container, not the textarea element. -
Well, now you are missing most of the indentation. If you press the down arrow to the right of the HTML code box and select āTidy HTMLā it will add back the indentation.
Let me give you an example of what I mean.
Your formatting now:
<div class="answer">
<ul>
<li class="radio"><label>
<input name="radio-buttons" value="1" type="radio" class="Gender" required>Male</label></li>
<li class="radio"><label>
<input name="radio-buttons" value="2" type="radio" class="Gender">Female</label></li>
<li class="radio"><label>
<input name="radio-buttons" value="3" type="radio" class="Gender">Nonbinary</label></li>
<li class="radio"><label>
<input name="radio-buttons" value="4" type="radio" class="Gender">Other</label></li>
<li class="radio"><label>
<input name="radio-buttons" value="5" type="radio" class="Gender" >Prefer not to say</label></li>
</ul>
</div>
More traditional formatting (by hand):
<div class="answer">
<ul>
<li class="radio">
<label>
<input name="radio-buttons" value="1" type="radio" class="Gender" required>Male
</label>
</li>
<li class="radio">
<label>
<input name="radio-buttons" value="2" type="radio" class="Gender">Female
</label>
</li>
<li class="radio">
<label>
<input name="radio-buttons" value="3" type="radio" class="Gender">Nonbinary
</label>
</li>
<li class="radio">
<label>
<input name="radio-buttons" value="4" type="radio" class="Gender">Other
</label>
</li>
<li class="radio">
<label>
<input name="radio-buttons" value="5" type="radio" class="Gender">Prefer not to say
</label>
</li>
</ul>
</div>
Auto formatting done by Prettier:
<div class="answer">
<ul>
<li class="radio">
<label>
<input
name="radio-buttons"
value="1"
type="radio"
class="Gender"
required
/>Male
</label>
</li>
<li class="radio">
<label>
<input
name="radio-buttons"
value="2"
type="radio"
class="Gender"
/>Female
</label>
</li>
<li class="radio">
<label>
<input
name="radio-buttons"
value="3"
type="radio"
class="Gender"
/>Nonbinary
</label>
</li>
<li class="radio">
<label>
<input
name="radio-buttons"
value="4"
type="radio"
class="Gender"
/>Other
</label>
</li>
<li class="radio">
<label>
<input
name="radio-buttons"
value="5"
type="radio"
class="Gender"
/>Prefer not to say
</label>
</li>
</ul>
</div>
Codepen isnāt super great when you have to write a lot of HTML, it can get a bit messy. I prefer to use an editor like VS Code with the Prettier extension installed, do the work there, and then copy the code to Codepen when Iām done.
Google HTML/CSS Style Guide
https://google.github.io/styleguide/htmlcssguide.html
Wow! nice job!
Everything is styled really nicely!!