-
-
Notifications
You must be signed in to change notification settings - Fork 432
Birmingham | 26-ITP-Jan | Mohammed Omer | Sprint 2 | Form-Control #1184
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
c0db975
c0c462e
57c125a
e2b9131
504612c
0457884
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,189 @@ | ||
| <!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="viewport" content="width=device-width, initial-scale=1" /> | ||
| </head> | ||
| <body> | ||
| <header> | ||
| <h1>Product Pick</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--> | ||
| </form> | ||
| </main> | ||
| <footer> | ||
| <!-- change to your name--> | ||
| <p>By HOMEWORK SOLUTION</p> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
|
|
||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
| <title>T-Shirt Order</title> | ||
| <meta name="description" content="T-Shirt order form" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
|
|
||
| <style> | ||
| body { | ||
| font-family: Arial, sans-serif; | ||
| background-color: #f4f4f4; | ||
| margin: 0; | ||
| padding: 0; | ||
| } | ||
|
|
||
| header, | ||
| footer { | ||
| text-align: center; | ||
| padding: 1rem; | ||
| background-color: #222; | ||
| color: white; | ||
| } | ||
|
|
||
| main { | ||
| max-width: 600px; | ||
| margin: 2rem auto; | ||
| background: white; | ||
| padding: 2rem; | ||
| border-radius: 8px; | ||
| box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
| } | ||
|
|
||
| h1, | ||
| h2 { | ||
| margin-top: 0; | ||
| } | ||
|
|
||
| section { | ||
| margin-bottom: 1.5rem; | ||
| } | ||
|
|
||
| label { | ||
| display: inline-block; | ||
| margin-bottom: 0.3rem; | ||
| } | ||
|
|
||
| input[type="text"], | ||
| input[type="email"] { | ||
| width: 100%; | ||
| padding: 0.5rem; | ||
| margin-bottom: 1rem; | ||
| border: 1px solid #ccc; | ||
| border-radius: 4px; | ||
| } | ||
|
|
||
| fieldset { | ||
| border: 1px solid #ccc; | ||
| padding: 1rem; | ||
| border-radius: 4px; | ||
| } | ||
|
|
||
| legend { | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| button { | ||
| padding: 0.7rem 1.2rem; | ||
| border: none; | ||
| border-radius: 4px; | ||
| background-color: #0077cc; | ||
| color: white; | ||
| font-size: 1rem; | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| button:hover { | ||
| background-color: #005fa3; | ||
| } | ||
|
|
||
| footer p { | ||
| margin: 0; | ||
| position: fixed; | ||
| bottom: 0; | ||
| left: 0; | ||
| width: 100%; | ||
| } | ||
| </style> | ||
| </head> | ||
|
|
||
| <body> | ||
| <header> | ||
| <h1>T-shirt Sale</h1> | ||
| </header> | ||
|
|
||
| <main> | ||
| <form> | ||
|
|
||
| <!-- Customer Information --> | ||
| <section> | ||
| <h2>Customer Information</h2> | ||
|
|
||
| <p> | ||
| <label for="name">Name *</label> | ||
| <input type="text" id="name" name="customer-name" required minlength="2" /> | ||
| </p> | ||
|
|
||
| <p> | ||
| <label for="email">Email *</label> | ||
| <input type="email" id="email" name="customer-email" required /> | ||
| </p> | ||
| </section> | ||
|
|
||
| <!-- Colour Selection --> | ||
| <section> | ||
| <h2>T-Shirt Colour *</h2> | ||
| <fieldset> | ||
| <legend>Select one colour</legend> | ||
|
|
||
| <div> | ||
| <input type="radio" id="red" name="colour" value="red" required /> | ||
| <label for="red">Red</label> | ||
| </div> | ||
|
|
||
| <label> | ||
| <input type="radio" name="colour" value="red" required /> | ||
|
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. This radio button was declared in a slightly different way than others, it's not getting the CSS changes and doesn't fulfil the original requirements to be associated with the input. How can we improve it? |
||
| Red | ||
| </label> | ||
|
|
||
| <p> | ||
|
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. We are wrapping radio buttons into paragraphs, which might be a better fit for text. Can you find a more appropriate tag to wrap them instead? |
||
| <input type="radio" id="black" name="colour" value="black" /> | ||
| <label for="black">Black</label> | ||
| </p> | ||
| </fieldset> | ||
| </section> | ||
|
|
||
| <!-- Size Selection --> | ||
| <section> | ||
| <h2>T-Shirt Size *</h2> | ||
| <fieldset> | ||
| <legend>Select one size</legend> | ||
|
|
||
| <p> | ||
| <input type="radio" id="xs" name="size" value="XS" required /> | ||
| <label for="xs">XS</label> | ||
| </p> | ||
|
|
||
| <p> | ||
| <input type="radio" id="s" name="size" value="S" /> | ||
| <label for="s">S</label> | ||
| </p> | ||
|
|
||
| <p> | ||
| <input type="radio" id="m" name="size" value="M" /> | ||
| <label for="m">M</label> | ||
| </p> | ||
|
|
||
| <p> | ||
| <input type="radio" id="l" name="size" value="L" /> | ||
| <label for="l">L</label> | ||
| </p> | ||
|
|
||
| <p> | ||
| <input type="radio" id="xl" name="size" value="XL" /> | ||
| <label for="xl">XL</label> | ||
| </p> | ||
|
|
||
| <p> | ||
| <input type="radio" id="xxl" name="size" value="XXL" /> | ||
| <label for="xxl">XXL</label> | ||
| </p> | ||
| </fieldset> | ||
| </section> | ||
|
|
||
| <!-- Submit --> | ||
| <section> | ||
| <button type="submit">Submit Order</button> | ||
| </section> | ||
| </form> | ||
| </main> | ||
|
|
||
| <footer> | ||
| <p>Website Dedicated To T-shirt Sale</p> | ||
|
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. We had slightly different requirements for the content of this footer. Let's check the edited files again and address it. |
||
| </footer> | ||
| </body> | ||
|
|
||
| </html> | ||
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.
Let's look into the colour selection a bit more, specifically the options. Do you see anything that might look off and not fulfil the requirements?