-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path11-Forms & Input Styling.html
More file actions
93 lines (81 loc) · 1.8 KB
/
11-Forms & Input Styling.html
File metadata and controls
93 lines (81 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>11-Forms & Input Styling</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
form {
max-width: 50%;
border: 2px solid black;
margin: 20px auto;
padding: 20px;
border-radius: 10px;
}
input {
width: 100%;
padding: 10px;
border: 2px solid #000;
border-radius: 6px;
font-size: 16px;
margin-bottom: 10px;
}
textarea {
width: 100%;
padding: 10px;
border: 2px solid #000;
border-radius: 6px;
font-size: 16px;
height: 120px;
margin-bottom: 10px;
resize: vertical;
}
button {
background: #007bff;
color: white;
padding: 10px 18px;
border-radius: 6px;
border: 2px solid black;
cursor: pointer;
font-weight: 600;
width: 50%;
margin: 10px auto;
display: block;
}
button:hover {
background: #0056b3;
}
/* FIXED: added comma */
input:focus,
textarea:focus {
border-color: #007bff;
outline: none;
}
button:active {
transform: scale(0.98);
}
button:disabled {
background: #ccc;
cursor: not-allowed;
}
input:disabled {
background: #f0f0f0;
}
::placeholder {
color: #888;
}
</style>
</head>
<body>
<form action="">
<input type="text" placeholder="Enter Your Name" />
<textarea placeholder="Enter your message"></textarea>
<button>Submit</button>
</form>
</body>
</html>