Skip to content

Commit afa9373

Browse files
committed
Move inline CSS into external stylesheet
1 parent f45878f commit afa9373

2 files changed

Lines changed: 32 additions & 37 deletions

File tree

Form-Controls/index.html

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,14 @@
66
<title>My form exercise</title>
77
<meta name="description" content="Form for ordering T-Shirts" />
88
<meta name="viewport" content="width=device-width, initial-scale=1" />
9-
10-
<style>
11-
form div {
12-
margin-bottom: 10px;
13-
}
14-
#name,
15-
#email,
16-
#colour {
17-
padding: 10px;
18-
font-size: 1rem;
19-
border: 1px solid black;
20-
border-radius: 5px;
21-
}
22-
23-
input[type="text"],
24-
input[type="email"],
25-
select {
26-
width: 100%;
27-
max-width: 400px;
28-
padding: 20px;
29-
box-sizing: border-box;
30-
}
31-
32-
button {
33-
background-color: blue;
34-
color: white;
35-
padding: 10px 20px;
36-
border: none;
37-
border-radius: 8px;
38-
font-size: 1.5rem;
39-
cursor: pointer;
40-
}
41-
</style>
9+
<link rel="stylesheet" href="style.css" />
4210
</head>
4311
<body>
4412
<header>
4513
<h1>Product Pick - T-Shirt Order Form</h1>
4614
</header>
4715
<main>
4816
<form>
49-
5017
<div>
5118
<label for="name">Full Name</label>
5219
<input
@@ -62,7 +29,7 @@ <h1>Product Pick - T-Shirt Order Form</h1>
6229
<label for="email">Email Address</label>
6330
<input id="email" name="email" type="email" required />
6431
</div>
65-
32+
6633
<fieldset>
6734
<legend>Choose your Colour</legend>
6835

@@ -106,13 +73,11 @@ <h1>Product Pick - T-Shirt Order Form</h1>
10673
</label>
10774
</div>
10875
</fieldset>
109-
11076

11177
<button type="submit">Place Your Order</button>
11278
</form>
11379
</main>
11480
<footer>
115-
11681
<p>By CHINWE CHUKWUMA</p>
11782
</footer>
11883
</body>

Form-Controls/style.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
form div {
2+
margin-bottom: 10px;
3+
}
4+
#name,
5+
#email,
6+
#colour {
7+
padding: 10px;
8+
font-size: 1rem;
9+
border: 1px solid black;
10+
border-radius: 5px;
11+
}
12+
13+
input[type="text"],
14+
input[type="email"],
15+
select {
16+
width: 100%;
17+
max-width: 400px;
18+
padding: 20px;
19+
box-sizing: border-box;
20+
}
21+
22+
button {
23+
background-color: blue;
24+
color: white;
25+
padding: 10px 20px;
26+
border: none;
27+
border-radius: 8px;
28+
font-size: 1.5rem;
29+
cursor: pointer;
30+
}

0 commit comments

Comments
 (0)