Skip to content

Commit

Permalink
Added Contact us form reponsive design
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhijitMotekar99 committed Oct 4, 2024
1 parent eed0020 commit 93b3e4a
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 1 deletion.
134 changes: 134 additions & 0 deletions contact_us.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Poppins', sans-serif;
background-color: white;
margin: 0;
padding: 20px;
}

.container {
max-width: 600px;
margin: 0 auto;
background: white;
padding: 20px;
margin-top: 30px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h2 {
text-align: center;
color: #333;
}

h2::after {
content: "";
display: block;
width: 130px;
height: 5px;
background-color: #ea5541; /* Color for the line below the heading */
margin: 10px auto;
}

.container p {
font-size: small;
margin-left: 60px;
margin-right: 60px;
color: #555;
font-family: 'Poppins';
}

.form-group {
margin-bottom: 15px;
}

label {
display: block;
margin-bottom: 5px;
color: #555;
}

input[type="text"], input[type="email"], input[type="tel"], textarea {
width: 100%;
padding: 10px;
border: 1px solid #939393; /* Updated border color */
border-radius: 4px;
box-sizing: border-box;
}

textarea {
resize: vertical;
}

button {
background-color: #ea5541; /* Updated button background color */
color: white;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
width: 100%;
font-size: 16px;
}

button:hover {
background-color: #d94a38; /* Slightly darker shade on hover */
}

.message {
color: #28a745;
text-align: center;
margin-top: 15px;
}
</style>
</head>
<body>
<div class="container">
<h2>Get in Touch</h2>
<p>Whether you have questions, feedback, or need assistance, our team is here to help. Please fill out the form below, and we'll get back to you as soon as possible.</p>

<form id="contactForm">
<div class="form-group">
<label for="firstName">First Name</label>
<input type="text" id="firstName" name="firstName" required>
</div>
<div class="form-group">
<label for="lastName">Last Name</label>
<input type="text" id="lastName" name="lastName" required>
</div>
<div class="form-group">
<label for="email">Email Address</label>
<input type="email" id="email" name="email" required>
</div>
<div class="form-group">
<label for="phone">Phone Number</label>
<input type="tel" id="phone" name="phone" required>
</div>
<div class="form-group">
<label for="message">Message</label>
<textarea id="message" name="message" rows="4" required></textarea>
</div>
<button type="submit">Send</button>
</form>

<div class="message" id="responseMessage"></div>
</div>

<script>
const form = document.getElementById('contactForm');
form.addEventListener('submit', function(event) {
event.preventDefault();
document.getElementById('responseMessage').textContent = "Thank you for contacting us!";
form.reset();
});
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion start.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<li><a href="start.html" class="nav-link">Start Writing</a></li>
<li><a href="category.html" class="nav-link">Categories</a></li>
<li><a href="about.html" class="nav-link">About</a></li>
<li><a href="contact.html" class="nav-link">Contact Us</a></li>
<li><a href="contact_us.html" class="nav-link">Contact Us</a></li>
</ul>
<ul class="navbar-nav d-flex">
<div class="search-box">
Expand Down

0 comments on commit 93b3e4a

Please sign in to comment.