Skip to content

Commit 7bcf668

Browse files
committed
Complete T-shirt Order Form
1 parent ff7b9d0 commit 7bcf668

2 files changed

Lines changed: 99 additions & 9 deletions

File tree

Form-Controls/index.html

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,63 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6-
<title>My form exercise</title>
6+
<title>T-shirt Oder Form</title>
77
<meta name="description" content="" />
88
<meta name="viewport" content="width=device-width, initial-scale=1" />
9+
<link rel="stylesheet" href="style.css">
910
</head>
1011
<body>
1112
<header>
12-
<h1>Product Pick</h1>
13+
<h1>T-shirt Order Form</h1>
1314
</header>
14-
<main>
15+
<main class="Form-container">
1516
<form>
16-
<!-- write your html here-->
17-
<!--
18-
try writing out the requirements first as comments
19-
this will also help you fill in your PR message later-->
17+
<Fieldset>
18+
<div>
19+
<label for="name">Customer Name</label>
20+
<input
21+
type="text"
22+
id="name"
23+
name="name"
24+
pattern=".*\S.{1,}.*"
25+
title="Please enter at least two non-space characters."
26+
required/>
27+
</div>
28+
<div>
29+
<label for="email">Customer E-mail</label>
30+
<input
31+
type="email"
32+
id="email"
33+
name="email"
34+
required/>
35+
</div>
36+
<div>
37+
<label for="colour">Choose a Colour</label>
38+
<select id="colour" name="colour" required>
39+
<option value="">-- Select a colour --</option>
40+
<option value="black">Black</option>
41+
<option value="white">White</option>
42+
<option value="red">Red</option>
43+
</select>
44+
</div>
45+
<div>
46+
<label for="size">Select a Size</label>
47+
<select id="size" name="size" required>
48+
<option value="">-- Select a size --</option>
49+
<option value="XS">XS</option>
50+
<option value="S">S</option>
51+
<option value="M">M</option>
52+
<option value="L">L</option>
53+
<option value="XL">XL</option>
54+
<option value="XXL">XXL</option>
55+
</select>
56+
</div>
57+
<button type="submit">Submit Order</button>
58+
</Fieldset>
2059
</form>
2160
</main>
2261
<footer>
23-
<!-- change to your name-->
24-
<p>By HOMEWORK SOLUTION</p>
62+
<p>By Dipa Sarker</p>
2563
</footer>
2664
</body>
2765
</html>

Form-Controls/style.css

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
body {
2+
font-family: Arial, sans-serif;
3+
background-color: #f4f4f4;
4+
padding: 40px;
5+
}
6+
7+
.form-container {
8+
max-width: 500px;
9+
margin: auto;
10+
background: #ffffff;
11+
padding: 24px;
12+
border-radius: 8px;
13+
box-shadow: 0 0 10px rgba(0,0,0,0.1);
14+
}
15+
16+
h1 {
17+
text-align: center;
18+
margin-bottom: 24px;
19+
}
20+
21+
fieldset {
22+
border: none;
23+
margin-bottom: 20px;
24+
padding: 0;
25+
}
26+
27+
label {
28+
display: block;
29+
margin-bottom: 8px;
30+
font-weight: bold;
31+
}
32+
33+
input,
34+
select,
35+
button {
36+
width: 100%;
37+
padding: 10px;
38+
margin-bottom: 16px;
39+
border: 1px solid #ccc;
40+
border-radius: 4px;
41+
font-size: 16px;
42+
}
43+
44+
button {
45+
background-color: #000;
46+
color: #fff;
47+
cursor: pointer;
48+
}
49+
50+
button:hover {
51+
background-color: #333;
52+
}

0 commit comments

Comments
 (0)