-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
London-ITP-Jan| Rawan_Almutairi| FormControl| week2 #274
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<link rel="stylesheet" href="style.css" /> | ||
<title>My form exercise</title> | ||
<meta name="description" content="" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
|
@@ -17,11 +18,58 @@ <h1>Product Pick</h1> | |
<!-- | ||
try writing out the requirements first as comments | ||
this will also help you fill in your PR message later--> | ||
<!-- Writing that out as a series of questions to ask yourself: | ||
|
||
1. What is the customer's name? I must collect this data, and validate it. But what is a valid name? I must decide something. | ||
2. What is the customer's email? I must make sure the email is valid. Email addresses have a consistent pattern. | ||
3. What colour should this t-shirt be? I must give 3 options. How will I make sure they don't pick other colours? | ||
4. What size does the customer want? I must give the following 6 options: XS, S, M, L, XL, XXL | ||
|
||
All fields are required.--> | ||
<p> | ||
<label for="Customer_Name">Name:</label> | ||
<input minlength="3" maxlength="10" type="text" id="name" name="customer_name"/> | ||
<!-- I used the minlength and maxlength to validate the user input for the name in the range of 3-10 letters--> | ||
</p> | ||
<p> | ||
<label for="Customer_Email">Email:</label> | ||
<input type="email" id="email" email="Customer_Email"/> | ||
<!-- using the input type email will validate the input put by the user to be in the email form--> | ||
</p> | ||
|
||
<p> | ||
<label for="t-shirt color"> | ||
<span>T-Shirt Color:</span> | ||
|
||
</label> | ||
<select id="t-shirt-color" name="t-shirt-color"> <!-- giving the user choices to choose from using the select tag --> | ||
<option value="red">Red t-shirt</option> | ||
<option value="blue">white t-shirt</option> | ||
<option value="green">Green t-shirt</option> | ||
|
||
|
||
</select> | ||
</p> | ||
<p> | ||
<label for="t-shirt size"> | ||
<span>T-Shirt Size:</span> | ||
|
||
</label> | ||
<select id="t-shirt-size" name="t-shirt-size"> | ||
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. Also one size from a defined set of 6 sizes is supposed to be required. Please look at the task description again to understand what to do. Good Job! |
||
<option value="XS">XS size</option> | ||
<option value="S">S Size</option> | ||
<option value="M">M size</option> | ||
<option value="XL">XL Size</option> | ||
<option value="XXL">XXL size</option> | ||
|
||
</select> | ||
</p> | ||
<input type="submit" value="submit"> | ||
</form> | ||
</main> | ||
<footer> | ||
<!-- change to your name--> | ||
<h2>By HOMEWORK SOLUTION</h2> | ||
<h2>Rawan Almutairi</h2> | ||
</footer> | ||
</body> | ||
</html> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
body { | ||
background-color: bisque; | ||
opacity: 0.8; | ||
background-image: url("https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTpy98dMScFbfgHyrpe367zKGKO7Ui66svLHg&s"); | ||
} | ||
|
||
form { | ||
width: 420px; | ||
box-sizing: border-box; | ||
border: 2px solid #ccc; | ||
border-radius: 5px; | ||
font-size: 22px; | ||
background-color: rosybrown; | ||
background-image: url("https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTzGzaWTYf6UTVgexOHtNJHLtyiAJmUGSk8gA&s"); | ||
background-position: 20px 20px; | ||
padding: 12px 20px 12px 40px; | ||
transition: width 0.01s; | ||
} |
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 is okay, good job, however, the footer is supposed to be fixed to the bottom of the view port, please look at the task description to understand what to do. Good work! |
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.
One color from a defined set of three is supposed to be required. Please look at the task description for clarification