Skip to content

Commit ff30284

Browse files
author
Ogbemi mene
committed
my new form for luke
1 parent 2f98a7b commit ff30284

2 files changed

Lines changed: 54 additions & 33 deletions

File tree

Form-Controls/Untitled-1.css

Lines changed: 44 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,81 @@
1-
1+
/* 1. Reset defaults and center everything on the page */
22
body {
3-
background-color: #7a8f88;
3+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
4+
background-color: #f4f7f6;
5+
margin: 0;
6+
padding: 20px;
47
display: flex;
5-
justify-content: center;
8+
flex-direction: column;
69
align-items: center;
7-
height: 100vh;
8-
margin: 0;
10+
justify-content: center;
11+
min-height: 100vh;
12+
box-sizing: border-box;
13+
}
14+
15+
h1 {
16+
color: #2c3e50;
17+
margin-bottom: 20px;
18+
font-size: 2rem;
919
}
1020

11-
form {
12-
background: #9b7a7a;
13-
padding: 2rem;
21+
.form {
22+
background-color: #ffffff;
23+
padding: 30px;
1424
border-radius: 8px;
15-
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
25+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
1626
width: 100%;
1727
max-width: 400px;
28+
box-sizing: border-box;
1829
}
1930

20-
form div {
21-
margin-bottom: 1.5rem;
31+
.form > div {
32+
margin-bottom: 20px;
2233
display: flex;
2334
flex-direction: column;
2435
}
36+
2537
label {
26-
font-weight: bold;
2738
font-size: 0.85rem;
28-
margin-bottom: 0.5rem;
29-
color: #333;
39+
font-weight: 600;
40+
color: #34495e;
41+
margin-bottom: 8px;
3042
text-transform: uppercase;
43+
letter-spacing: 0.5px;
3144
}
3245

3346
input[type="text"],
3447
input[type="email"],
3548
select {
36-
padding: 10px;
37-
border: 1px solid #817575;
38-
border-radius: 4px;
49+
padding: 10px 14px;
3950
font-size: 1rem;
51+
border: 1px solid #ccc;
52+
border-radius: 4px;
53+
background-color: #fff;
54+
color: #333;
4055
outline: none;
41-
transition: border-color 0.3s;
56+
transition: border-color 0.2s ease, box-shadow 0.2s ease;
4257
}
4358

44-
input:focus,
59+
input:focus,
4560
select:focus {
46-
border-color: #007bff;
61+
border-color: #3498db;
62+
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
4763
}
4864

4965
button {
50-
width: 100%;
51-
padding: 12px;
52-
background-color: #28a745;
66+
background-color: #366280;
5367
color: white;
5468
border: none;
69+
padding: 12px;
70+
font-size: 1rem;
71+
font-weight: 600;
5572
border-radius: 4px;
56-
font-size: 1.1rem;
5773
cursor: pointer;
58-
transition: background-color 0.3s;
74+
width: 100%;
75+
transition: background-color 0.2s ease;
76+
margin-top: 10px;
5977
}
6078

6179
button:hover {
62-
background-color: #218838;
80+
background-color: #2980b9;
6381
}

Form-Controls/index.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44

55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>My form exercise work</title>
7+
<title>Product Pick Form</title>
88
<link rel="stylesheet" href="Untitled-1.css">
99
</head>
1010

1111
<body>
12-
<form action="T-shirt.html" method="GET">
12+
<h1>PRODUCT PICK</h1>
13+
14+
<form action="T-shirt.html" method="GET" class="form">
1315

1416
<div>
1517
<label for="name">NAME</label>
16-
<input type="text" name="name" id="name" placeholder="name" value="name" required>
18+
<input type="text" name="name" id="name" placeholder="name" value="name" minlength="2" maxlength="100" required>
1719
</div>
1820

1921
<div>
@@ -22,7 +24,6 @@
2224
</div>
2325

2426
<div>
25-
colour of T-shirt
2627
<label for="colour">colour of T-shirt</label>
2728
<select name="colour" id="colour">
2829
<option value="red">red</option>
@@ -32,10 +33,9 @@
3233
</div>
3334

3435
<div>
35-
size of T-shirt
36-
<label for="size">size of T-shirt</label>
37-
36+
<label for="size">size of T-shirt</label>
3837
<select name="size" id="size" required>
38+
<option value="XS">XS</option>
3939
<option value="S">S</option>
4040
<option value="M">M</option>
4141
<option value="L">L</option>
@@ -45,5 +45,8 @@
4545
</div>
4646

4747
<button>Submit</button>
48+
</form>
49+
</body>
50+
</html>
4851

4952

0 commit comments

Comments
 (0)