-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchallenge-03.html
More file actions
executable file
·255 lines (219 loc) · 6.39 KB
/
challenge-03.html
File metadata and controls
executable file
·255 lines (219 loc) · 6.39 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<!doctype html>
<html>
<head>
<title>Flex Box Challenge 3 Solution</title>
<style>
/* Your styles here */
/* Set some base styles used by all elements */
body {
/* Set a base font style */
/* font family Helvetica */
font-family: Helvetica;
/* font weight 100 */
font-weight: 100;
/* font size 18px */
font-size: 18px;
/* line-height 1.5 */
line-height: 3;
/* color #666 */
color: #666;
/* display flex */
display: flex;
/* justify content center */
justify-content: center;
/* align-items: center; */
align-items: center;
}
/* Use flex to arrange everything in a column */
/* Style the from tag */
form {
/* use flex to display everything in the form in a column */
display: flex;
flex-direction: column;
/* padding 2em */
padding: 1em;
/* Make the form fill the space but not larger than 600px */
/* width: 100% */
width: 100%;
/* max-width 600px */
max-width: 600px;
}
/* Some general styles */
/* Style both the input and textarea elements */
input,
textarea {
/* font size 1em */
font-size: 1em;
/* padding 0.75em */
padding: 0.75em;
}
/* File upload styles */
/* Style inputs with type attribute equal to file: <input type="file"> */
input[type=file] {
/* File is special we'll hide it's input */
/* Hide the file input. You'll use the label for interaction */
display: none;
}
/* Style label with attribute for and value "input-file" <label for="input-file"> */
label[for=input-file] {
/* Make this label look like a button */
/* border style solid, border width 1px */
border-style: solid;
/* padding 1em */
padding: 0.2em;
/* border radius 0.25em */
border-radius: 0.25em;
/* text align center */
text-align: center;
}
textarea {
/* This changes how the box model is calculated */
/* box-sizing: border-box; */
box-sizing: border-box;
/* width 100% fill the horizontal space */
width: 100%;
/* height of 6em */
height: 6em;
}
/* Use flex to arrange each of the labels in a column */
/* This covers the first 4 inputs */
label {
/* display flex direction column */
display: flex;
flex-direction: column;
}
/* The radio buttons and checkboxes need to arranged in a row */
/* Style a label with the class name h: <label class="h"> */
label.h {
/* flex direction rol */
flex-direction: row;
/* align items center */
align-items: center;
/* Add some margin to make some space */
/* margin left 0.25em, margin top 0, margin right 0.25em margin left 0 */
margin: 0 0.25em 0 0.25em;
}
/* Style input type text, email, password, datetime, number */
/* Use padding, border, margin, and border radius */
/* Style four inputs each with type attribute and values of: text, email, date, number */
input[type=text],
input[type=email],
input[type=date],
input[type=number] {
/* border solid 1px #666 */
border: solid 1px #666;
/* margin top and bottom 1em left and right 0 */
margin: 1em 0 1em 0;
/* border radius 0.25em */
border-radius: 0.25em;
}
/* Style the inputs type radio, checkbox, file */
/* Style three inputs with type attribute and values of radio, checkbox, file */
input[type=radio],
input[type=checkbox],
input[type=file] {
}
/* Style a span that is a child of an input */
input > span {
/* margin left 1em 0 everywhere else */
margin: 0 0 0 1em;
}
/* Style a button with type = submit <button type="submit"> */
button[type=submit] {
/* padding 1em all sides */
padding: 1em 1em 1em 1em;
/* color orange */
color: orange;
/* border none */
border: none;
/* border radius 0.25em */
border-radius: 0.25em;
/* margin 1em bottom, 0 on the other 3 sides */
margin: 0 0 1em 0;
/* width 100px */
width: 100px;
/* Move this to right with flex */
/* align-self: flex-end; */
align-self: flex-end;
}
/* Style section that is a chile of a form */
form > section {
/* margin on the top and bottom 1em, margin 0 left and right */
/* margin: 1em 0 1em 0; */
}
/* Style the last child section of a form */
form > section:last-child {
/* align-self: flex-end; */
align-self: flex-end;
}
</style>
</head>
<body>
<form action="#" method="post">
<section>
<label>
<span>Name</span>
<input name="name" type="text" placeholder="Your name">
</label>
<label>
<span>Email</span>
<input name="email" type="email" placeholder="email">
</label>
<label>
<span>Pet Count</span>
<input name="pets" type="number" placeholder="# of pets">
</label>
<label>
<span>Birthday</span>
<input name="birthday" type="date" placeholder="birthday">
</label>
</section>
<section>
<label class="h" for="radio-admin">
<span>Prefix</span>
<select name="prefix">
<option>Mr</option>
<option>Mrs</option>
<option>Ms</option>
<option>Sir</option>
<option>Madam</option>
<option>Dr</option>
<option>None</option>
</select>
</label>
</section>
<section>
<label class="h" for="radio-admin">
<input id="radio-admin" type="radio" name="role" value="Admin" />
<span>Admin</span>
</label>
<label class="h">
<input type="radio" name="role" value="Editor" />
<span>Editor</span>
</label>
<label class="h">
<input type="radio" name="role" value="Contributor" />
<span>Contributor</span>
</label>
</section>
<section>
<label class="h">
<input type="checkbox" name="public">
<span>Public Bio</span>
</label>
</section>
<section>
<textarea name="bio"></textarea>
</section>
<section>
<label for="input-file">
<input name="image" type="file" id="input-file">
Upload Image
</label>
</section>
<section>
<button type="submit">Submit</button>
</section>
</form>
</body>
</html>