Skip to content

Commit 65fbf0f

Browse files
committed
create the format as requested and also Add style folder for the css
1 parent 7658690 commit 65fbf0f

File tree

2 files changed

+82
-4
lines changed

2 files changed

+82
-4
lines changed

Form-Controls/index.html

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,58 @@
66
<title>My form exercise</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>
1213
<h1>Product Pick</h1>
1314
</header>
1415
<main>
1516
<form>
16-
<!-- write your html here-->
17+
<p> please enter the required (*) information to order your T-shirt. </p>
18+
<fieldset>
19+
<legend>Customer Information</legend>
20+
<label for="name">Name:*</label>
21+
<input type="text" id="name" name="name" required pattern="[A-za-z/s]{2,50}"/>
22+
<br />
23+
<label for="email">Email:*</label>
24+
<input type="email" id="email" name="email" required />
25+
</fieldset>
26+
1727
<!--
18-
try writing out the requirements first as comments
19-
this will also help you fill in your PR message later-->
28+
customer name, with validation
29+
customer's email
30+
---- The upper one customer information-----
31+
//
32+
---- The lower one product information-----
33+
color of T-shire (choose one from 3 option)
34+
size of T-shirt (choose one from xs, s, m, l, xl,xxl)-->
35+
<fieldset>
36+
<legend>Product Information</legend>
37+
<label for="color">Color:*</label>
38+
<select id="color" name="color" required>
39+
<option value="">--Please choose a color--</option>
40+
<option value="red">Red</option>
41+
<option value="blue">Blue</option>
42+
<option value="green">Green</option>
43+
</select>
44+
<br />
45+
<label for="size">Size:*</label>
46+
<select id="size" name="size" required>
47+
<option value="">--Please choose a size--</option>
48+
<option value="xs">XS</option>
49+
<option value="s">S</option>
50+
<option value="m">M</option>
51+
<option value="l">L</option>
52+
<option value="xl">XL</option>
53+
<option value="xxl">XXL</option>
54+
</select>
55+
</fieldset>
2056
</form>
2157
</main>
2258
<footer>
2359
<!-- change to your name-->
24-
<p>By HOMEWORK SOLUTION</p>
60+
<p>By Dagim Daniel</p>
2561
</footer>
2662
</body>
2763
</html>

Form-Controls/style.css

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
:root {
2+
--paper: oklch(7 0 0);
3+
--ink: color-mix(in oklab, var(--color) 5%, black);
4+
--font: 100%/1.5 system-ui;
5+
--space: clamp(6px, 6px + 2vw, 15px);
6+
--line: 1px solid;
7+
--container: 1280px;
8+
}
9+
/* ====== Base Elements ======
10+
General rules for basic HTML elements in any context */
11+
body {
12+
background: var(--paper);
13+
color: var(--ink);
14+
font: var(--font);
15+
}
16+
/* ====== Site Layout ======
17+
Setting the overall rules for page regions
18+
https://www.w3.org/WAI/tutorials/page-structure/regions/
19+
*/
20+
body {
21+
max-width: var(--container);
22+
margin: 0 auto calc(var(--space) * 4) auto;
23+
}
24+
h1 {
25+
26+
text-align: center;
27+
}
28+
fieldset{
29+
padding:var (--space);
30+
max-width:100%;
31+
}
32+
input :invalid
33+
{
34+
border-color:red;
35+
}
36+
footer{
37+
background-image: linear-gradient(to right, grey, lightgreen);
38+
width:var(--container);
39+
position: fixed;
40+
bottom: 0;
41+
text-align: center;
42+
}

0 commit comments

Comments
 (0)