-
-
Notifications
You must be signed in to change notification settings - Fork 92
London_11 | Saqib_Javed | Module-User-Focused-Data | Form-Control | week2 #209
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 |
---|---|---|
|
@@ -9,19 +9,69 @@ | |
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
|
||
<header> | ||
<h1>Product Pick</h1> | ||
</header> | ||
<main> | ||
<h2 class="para">Please fill in the order form to complete your order</h2> | ||
|
||
<form> | ||
<!-- write your html here--> | ||
<!-- try writing out the requirements first--> | ||
</form> | ||
<div class="form"> | ||
<label for="name">Full Name:</label><br> | ||
<input type="text" id="fname" name="fname" pattern="[A-Za-z]+" title="Only letters are allowed" 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. Nice use of See these blog posts for more assumptions that aren't true about names: Any thoughts on this, e.g. changing the pattern and/or combining the name fields? 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. should i do full name insread of first name and last name? 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. fixed |
||
<br> | ||
<!-- <label for="lname">Last Name:</label><br> | ||
<input type="text" id="lname" name="lname" pattern="[A-Za-z]+" title="Only letters are allowed" required/> --> | ||
<br> | ||
<label for="email">Email:</label><br> | ||
<input id="email" type="email" name="email" required/> | ||
</div> | ||
|
||
|
||
<div class="shirt-colors"> | ||
<fieldset> | ||
<legend>Choose Colors:</legend> | ||
|
||
<input id="white" type="radio" name="color" value="white" required/> | ||
<label for="white">White</label> | ||
|
||
<input id="red" type="radio" name="color" value="red"/> | ||
<label for="red">Red</label> | ||
|
||
<input id="black" type="radio" name="color" value="black"/> | ||
<label for="black">Black</label> | ||
</fieldset> | ||
</div> | ||
|
||
<div class="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. I notice that I can submit the form without choosing a size option. How should we handle this case? 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. fixed |
||
|
||
<label for="size">T-shirt size</label><br> | ||
<select class="size" name="size" required> | ||
<option value="x-small">xs</option> | ||
<option value="small">S</option> | ||
<option value="medium">M</option> | ||
<option value="large">L</option> | ||
<option value="x-large">XL</option> | ||
<option value="xx-large">XXL</option> | ||
</select> | ||
</div> | ||
|
||
<div class="delivery"> | ||
<label for="delivery"> | ||
Chose your delivery date: | ||
<input type="date" name="delivery" min="2024-10-13" max="2024-11-01" required/> | ||
</label> | ||
</div> | ||
|
||
<div> | ||
<button class="btn">submit</button> | ||
</div> | ||
</form> | ||
</main> | ||
<footer> | ||
<!-- change to your name--> | ||
<h2>By HOMEWORK SOLUTION</h2> | ||
|
||
<h2>By Saqib Javed - London 11 - ITP</h2> | ||
</footer> | ||
</body> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
* { | ||
padding: 5px; | ||
margin: 10px; | ||
background-color: rgb(222, 206, 206); | ||
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. assigning a background color to all elements might get tricky -- what's a way we can style the layout's background without doing so for every element? |
||
font-family: monospace; | ||
} | ||
|
||
header { | ||
text-align: center; | ||
font-size: 1.5rem; | ||
} | ||
|
||
.para { | ||
text-align: center; | ||
|
||
} | ||
|
||
.form { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
label{ | ||
color: #0a0a09; | ||
font-weight: bold; | ||
} | ||
|
||
|
||
input { | ||
background-color: aliceblue; | ||
border: 1px solid #ccc; | ||
padding: 8px; | ||
} | ||
|
||
.shirt-colors { | ||
display: flex; | ||
justify-content: center; | ||
align-content: center; | ||
} | ||
|
||
.shirt-size { | ||
display: flex; | ||
justify-content: center; | ||
color: aliceblue; | ||
} | ||
|
||
.delivery { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.size{ | ||
background-color: aliceblue; | ||
} | ||
|
||
.btn { | ||
display: block; | ||
margin: auto; | ||
display: flex; | ||
justify-content: center; | ||
color: whitesmoke; | ||
background-color: rgb(12, 12, 11); | ||
} | ||
|
||
.btn:hover { | ||
background-color: #444; | ||
cursor: pointer; | ||
} | ||
|
||
|
||
footer h2 { | ||
font-size: 0.75rem; | ||
text-align: center; | ||
} | ||
|
||
|
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.
Where did this closing tag go?
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.
fixed