Survey Form Goku page

Hi guys I just finish the survey page, take a look and tell me what you think
https://codepen.io/andreibri/full/wvzLMNe

I’ll get you started with a few obvious issues:

  • You do have <label>s on your page but they don’t have for attributes and thus they aren’t working properly. Exception is the check boxes, those are working properly because you’ve embedded them in the <label>.
  • As I Tab my way through your form I can’t really see the keyboard focus indicator because you are relying on the browser default and on my browser the color is very similar to the blue background color you are using. I would recommend that you always customize the focus indicator so it stands out very easily on your page no matter what browser you are using.
  • When I narrow my browser all the way in I am getting a horizontal scroll bar. That should not happen on a page this simple.
1 Like

Your form looks good @andre98briceag. Some things to revisit;

  • Codepen provides the boilerplate for you. It only expects the code you’d put within the body element in HTML. (No need to include the body tags). For anything you want to add to the <head> element click on the ‘Settings’ button, then HTML and add it into the ‘Stuff for <head>’ box.
    (Codepen actually has a link that you click to add that meta element.)
  • Run your HTML code through the W3C validator.
    • There are HTML coding errors you should be aware of and address.
    • Since copy/paste from codepen you can ignore the first warning and first two errors.
  • Codepen provides validators for HTML, CSS and JS. Click on the chevron in the upper right of each section and then click on the respective ‘Analyze’ link.
    • The one for CSS is good. Use it and address the issue(s).
    • (The one for HTML misses things which is why I recommend W3C)
  • User’s should be able to click on the label to toggle a selection, not just the radio button / checkbox
  • Change the cursor to a pointer when hovering over the submit button
  • Do not use the <br> element to force line breaks or spacing. That’s what CSS is for.
  • Make your page responsive. Remember, the R in RWD stands for Responsive
    • There’s a horizontal scrollbar on smaller screens

Maybe revisit this lesson to help with styling your page. It’s not only for radio buttons.

1 Like

So i take off the blue horizontal scrollbar but in the mobile screen i can’t put the h1 id=“title” and the p on the top of the page in the middle of the the screen some suggestion ?

Where can I see how to change the view only on the mobil screen and different in the desktop screen? to get more confidence into it?

Start with the narrow view (mobile) design first and then work your way wider, adding breakpoints where needed for the wider design.
Just narrow your browser. Drag the right edge as far to the left as you can and start your styling from there.

This may help too. Do not use fixed dimensions on elements, use max-width/height and relative units like %, em, rem and vw to keep everything responsive.

This may help too. Temporarily add the following to the top of the CSS editor to help you see how you’ve got your elements set up.

* {
  border: solid 1px black;
}