<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Course Application</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
header {
background-color: #333;
color: #fff;
padding: 10px;
text-align: center;
}
.course-container {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
padding: 20px;
}
.course-card {
width: calc(33.33% - 40px);
margin: 20px;
background-color: #fff;
padding: 15px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease-in-out;
box-sizing: border-box;
}
.course-card:hover {
transform: scale(1.05);
}
.course-title {
font-size: 1.2em;
font-weight: bold;
}
.course-description {
margin-top: 10px;
color: #555;
}
.course-info {
margin-top: 10px;
}
.apply-button {
display: block;
width: 100%;
padding: 10px;
margin-top: 15px;
background-color: #007bff;
color: #fff;
text-align: center;
text-decoration: none;
border: none;
border-radius: 5px;
cursor: pointer;
}
.apply-button:hover {
background-color: #0056b3;
}
.overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
justify-content: center;
align-items: center;
}
.form-container {
background: #fff;
padding: 20px;
border-radius: 8px;
width: 300px;
}
</style>
</head>
<body>
<header>
<h1>Course Application</h1>
</header>
<div class="course-container">
<div class="course-card">
<div class="course-title">Web Development Bootcamp</div>
<div class="course-description">Learn the fundamentals of web development and build modern websites.</div>
<div class="course-info">
<p><strong>Duration:</strong> 8 weeks</p>
<p><strong>Fee:</strong> $500</p>
<p><strong>Total Hours:</strong> 40 hours</p>
</div>
<button class="apply-button" onclick="openForm()">Apply</button>
</div>
</div>
<div class="overlay" id="formOverlay">
<div class="form-container">
<h2>Application Form</h2>
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<label for="phone">Phone:</label>
<input type="tel" id="phone" name="phone" required>
<button type="submit" onclick="closeForm()">Submit</button>
</form>
</div>
</div>
<script>
function openForm() {
document.getElementById("formOverlay").style.display = "flex";
}
function closeForm() {
document.getElementById("formOverlay").style.display = "none";
}
</script>
</body>
</html>