-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
124 lines (104 loc) · 3.47 KB
/
contact.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us - Stang Detailing</title>
<style>
/* CSS Styles */
body {
background-color: #f2f2f2;
color: #333;
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
}
header {
background-color: #333;
color: #fff;
padding: 10px 20px;
text-align: center;
}
nav ul {
list-style-type: none;
padding: 0;
}
nav ul li {
display: inline;
margin: 0 15px;
}
nav ul li a {
color: #fff;
text-decoration: none;
}
img {
max-width: 100%;
height: auto;
margin: 20px 0;
}
.contact-form {
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.contact-form input, .contact-form textarea {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ddd;
border-radius: 5px;
}
.contact-form button {
background-color: #00796b;
color: #fff;
border: none;
padding: 10px;
cursor: pointer;
border-radius: 5px;
}
.contact-form button:hover {
background-color: #005e54;
}
</style>
</head>
<body>
<header>
<h1>Contact Stang Detailing</h1>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="contact.html">Services</a></li>
<li><a href="about.html">About Us</a></li>
</ul>
</nav>
</header>
<main>
<h2>We'd Love to Hear From You!</h2>
<img src=https://t4.ftcdn.net/jpg/07/09/56/09/360_F_709560963_lMJaWtQXjMwP4lQoAW4mFZPSpPllVpZZ.jpg alt="Car being cleaned">
<div class="contact-form">
<form id="contactForm">
<input type="text" id="name" placeholder="Your Name" required>
<input type="email" id="email" placeholder="Your Email" required>
<textarea id="message" rows="5" placeholder="Your Message" required></textarea>
<button type="submit">Send Message</button>
</form>
<div id="formResponse"></div>
</div>
</main>
<script>
// JavaScript for form submission
document.getElementById('contactForm').addEventListener('submit', function (event) {
event.preventDefault(); // Prevent default form submission
// Get form values
const name = document.getElementById('name').value;
const email = document.getElementById('email').value;
const message = document.getElementById('message').value;
// Display a response (in a real application, you'd send this to a server)
document.getElementById('formResponse').innerText = `Thank you, ${name}! Your message has been received.`;
// Reset form fields
this.reset();
});
</script>
</body>
</html>