Skip to content

Commit 43967f2

Browse files
committed
centre header text
1 parent 73b1697 commit 43967f2

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

Form-Controls/results.html

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
7+
<title>Form Results</title>
8+
<style>
9+
body {
10+
font-family: Arial, sans-serif;
11+
margin: 20px;
12+
}
13+
.container {
14+
max-width: 600px;
15+
margin: 0 auto;
16+
}
17+
.result-item {
18+
padding: 10px;
19+
margin: 10px 0;
20+
border: 1px solid #ddd;
21+
border-radius: 4px;
22+
}
23+
</style>
24+
</head>
25+
<body>
26+
<div class="container">
27+
<h1>Form Results</h1>
28+
<div id="results"></div>
29+
</div>
30+
<script>
31+
// Display form results from URL parameters
32+
const params = new URLSearchParams(window.location.search);
33+
const resultsDiv = document.getElementById('results');
34+
35+
if (params.size === 0) {
36+
resultsDiv.innerHTML = '<p>No form data submitted.</p>';
37+
} else {
38+
params.forEach((value, key) => {
39+
const item = document.createElement('div');
40+
item.className = 'result-item';
41+
item.innerHTML = `<strong>${key}:</strong> ${value}`;
42+
resultsDiv.appendChild(item);
43+
});
44+
}
45+
</script>
46+
</body>
47+
</html>

Wireframe/style.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ body {
3131
color: var(--ink);
3232
font: var(--font);
3333
}
34+
35+
header{
36+
text-align: center;
37+
padding: calc(var(--space) * 2) var(--space);
38+
}
39+
3440
a {
3541
padding: var(--space);
3642
border: var(--line);

0 commit comments

Comments
 (0)