Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 500
London | 26-ITP-MAY | Chinwe Chukwuma | Sprint 1 | Form Controls#1392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bb6c17bccca42cba189807758364587c1c7164f988f3719bf319d0ea75f16f1a237a1bfa58d77418efc820e12119af1f1e6453378a5ba9e3f45878fafa9373File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,84 @@ | ||
| <!DOCTYPE html> | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
| <title>My form exercise</title> | ||
| <meta name="description" content="" /> | ||
| <meta name="description" content="Form for ordering T-Shirts" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <link rel="stylesheet" href="style.css" /> | ||
| </head> | ||
| <body> | ||
| <header> | ||
| <h1>Product Pick</h1> | ||
| <h1>Product Pick - T-Shirt Order Form</h1> | ||
| </header> | ||
| <main> | ||
| <form> | ||
| <!-- write your html here--> | ||
| <!-- | ||
| try writing out the requirements first as comments | ||
| this will also help you fill in your PR message later--> | ||
| <div> | ||
| <label for="name">Full Name</label> | ||
| <input | ||
| id="name" | ||
| name="name" | ||
| type="text" | ||
| required | ||
| pattern=".*\S.*\S.*" | ||
| /> | ||
| </div> | ||
| <div> | ||
| <label for="email">Email Address</label> | ||
| <input id="email" name="email" type="email" required /> | ||
| </div> | ||
| <fieldset> | ||
| <legend>Choose your Colour</legend> | ||
| <label for="colour" class="visually-hidden">Colour Choice</label> | ||
| <select id="colour" name="colour" required> | ||
| <option value="">Select Your Colour</option> | ||
| <option value="Burgundy">Burgundy</option> | ||
| <option value="Purple">Purple</option> | ||
| <option value="Yellow">Yellow</option> | ||
| </select> | ||
Comment on lines
+37
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI: I would switch around the form types. Radio buttons are good if there are not to many options to choose from. Space on a web page is precious and for inputs with a lot of options a dropdown can save a lot of space. (You don't need to change anything. This is just an information on the different input types) Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noted @Luro91. Thank you. | ||
| </fieldset> | ||
| <fieldset> | ||
| <legend>Size Choice</legend> | ||
| <div> | ||
| <label> | ||
| <input type="radio" name="size" value="XS" required /> | ||
| XS | ||
| </label> | ||
| <label> | ||
| <input type="radio" name="size" value="S" /> | ||
| S | ||
| </label> | ||
| <label> | ||
| <input type="radio" name="size" value="M" /> | ||
| M | ||
| </label> | ||
| <label> | ||
| <input type="radio" name="size" value="L" /> | ||
| L | ||
| </label> | ||
| <label> | ||
| <input type="radio" name="size" value="XL" /> | ||
| XL | ||
| </label> | ||
| <label> | ||
| <input type="radio" name="size" value="XXL" /> | ||
| XXL | ||
| </label> | ||
| </div> | ||
| </fieldset> | ||
| <button type="submit">Place Your Order</button> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
| <!-- change to your name--> | ||
| <p>By HOMEWORK SOLUTION</p> | ||
| <p>By CHINWE CHUKWUMA</p> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| form div { | ||
| margin-bottom: 10px; | ||
| } | ||
| #name, | ||
| #email, | ||
| #colour { | ||
| padding: 10px; | ||
| font-size: 1rem; | ||
| border: 1px solid black; | ||
| border-radius: 5px; | ||
| } | ||
| input[type="text"], | ||
| input[type="email"], | ||
| select { | ||
| width: 100%; | ||
| max-width: 400px; | ||
| padding: 20px; | ||
| box-sizing: border-box; | ||
| } | ||
| button { | ||
| background-color: blue; | ||
| color: white; | ||
| padding: 10px 20px; | ||
| border: none; | ||
| border-radius: 8px; | ||
| font-size: 1.5rem; | ||
| cursor: pointer; | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done on the validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Luro91