Skip to content

Commit 5ba0ce9

Browse files
committed
style: add basic form styling
1 parent c533798 commit 5ba0ce9

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

Form-Controls/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
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>
@@ -21,7 +22,6 @@ <h1>Product Pick</h1>
2122
5. All fields must be required
2223
6. No JavaScript allowed
2324
-->
24-
2525
<fieldset>
2626
<legend>Customer Details</legend>
2727
<label for="name">Full Name</label>
@@ -54,7 +54,7 @@ <h1>Product Pick</h1>
5454
<option value="xl">XL</option>
5555
<option value="xxl">XXL</option>
5656
</select>
57-
57+
5858
</fieldset>
5959

6060
<button type="submit">Submit Order</button>

Form-Controls/style.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
body {
2+
font-family: Arial, sans-serif;
3+
margin: 20px;
4+
padding: 0;
5+
}
6+
7+
form {
8+
max-width: 400px;
9+
}
10+
11+
label {
12+
display: block;
13+
margin-top: 15px;
14+
font-weight: bold;
15+
}
16+
17+
input,
18+
select {
19+
width: 100%;
20+
padding: 8px;
21+
margin-top: 5px;
22+
}
23+
24+
button {
25+
margin-top: 20px;
26+
padding: 10px;
27+
width: 100%;
28+
background-color: black;
29+
color: white;
30+
border: none;
31+
cursor: pointer;
32+
}

0 commit comments

Comments
 (0)