Certainly! Below is a fully responsive, modern, and clean HTML and CSS template tailored for a law firm's website using your specified color palette.
Color Palette
- Dark Blue:
#0e153a
- Primary Blue:
#3d5af1
- Accent Cyan:
#22d1ee
- Light Cyan:
#e2f3f5
Features
- Responsive Design: Adapts to different screen sizes.
- Clean Layout: Clear sections for easy navigation.
- Modern Aesthetic: Uses your color palette effectively for a professional look.
HTML (index.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Law Firm - Modern Legal Services</title>
<link rel="stylesheet" href="styles.css">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
</head>
<body>
<!-- Header -->
<header>
<div class="container">
<div class="logo">
<h1>LawFirm</h1>
</div>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#testimonials">Testimonials</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<div class="hamburger">
<span></span>
<span></span>
<span></span>
</div>
</div>
</header>
<!-- Hero Section -->
<section id="home" class="hero">
<div class="container">
<h2>Your Trusted Legal Partner</h2>
<p>Providing expert legal advice and representation with integrity and dedication.</p>
<a href="#contact" class="btn">Get Started</a>
</div>
</section>
<!-- About Section -->
<section id="about" class="about">
<div class="container">
<h2>About Us</h2>
<p>With over 20 years of experience, our team of dedicated lawyers is committed to delivering top-notch legal services tailored to your needs.</p>
<div class="about-content">
<div class="about-item">
<h3>Our Mission</h3>
<p>To provide exceptional legal solutions with professionalism and a client-centric approach.</p>
</div>
<div class="about-item">
<h3>Our Vision</h3>
<p>To be the leading law firm recognized for excellence, integrity, and innovation in legal services.</p>
</div>
</div>
</div>
</section>
<!-- Services Section -->
<section id="services" class="services">
<div class="container">
<h2>Our Services</h2>
<div class="services-grid">
<div class="service-item">
<h3>Corporate Law</h3>
<p>Comprehensive legal services for businesses, including formation, compliance, and mergers & acquisitions.</p>
</div>
<div class="service-item">
<h3>Family Law</h3>
<p>Expert guidance in matters like divorce, child custody, and family disputes.</p>
</div>
<div class="service-item">
<h3>Criminal Defense</h3>
<p>Defending your rights with a robust approach to criminal cases.</p>
</div>
<div class="service-item">
<h3>Real Estate Law</h3>
<p>Assistance with property transactions, disputes, and real estate regulations.</p>
</div>
</div>
</div>
</section>
<!-- Testimonials Section -->
<section id="testimonials" class="testimonials">
<div class="container">
<h2>What Our Clients Say</h2>
<div class="testimonial-grid">
<div class="testimonial-item">
<p>"The team at LawFirm provided exceptional service and helped us navigate a complex legal situation with ease."</p>
<h4>Jane Doe</h4>
</div>
<div class="testimonial-item">
<p>"Professional, knowledgeable, and dedicated. Highly recommend LawFirm for any legal needs."</p>
<h4>John Smith</h4>
</div>
<div class="testimonial-item">
<p>"Their expertise in corporate law was instrumental in the success of our merger. Outstanding support!"</p>
<h4>Emily Johnson</h4>
</div>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="contact" class="contact">
<div class="container">
<h2>Contact Us</h2>
<form action="#" method="post">
<div class="form-group">
<input type="text" name="name" placeholder="Your Name" required>
</div>
<div class="form-group">
<input type="email" name="email" placeholder="Your Email" required>
</div>
<div class="form-group">
<textarea name="message" rows="5" placeholder="Your Message" required></textarea>
</div>
<button type="submit" class="btn">Send Message</button>
</form>
</div>
</section>
<!-- Footer -->
<footer>
<div class="container">
<p>© 2023 LawFirm. All rights reserved.</p>
<div class="social">
<a href="#"><img src="icons/facebook.svg" alt="Facebook"></a>
<a href="#"><img src="icons/twitter.svg" alt="Twitter"></a>
<a href="#"><img src="icons/linkedin.svg" alt="LinkedIn"></a>
</div>
</div>
</footer>
<!-- Optional JavaScript for Hamburger Menu -->
<script>
const hamburger = document.querySelector('.hamburger');
const nav = document.querySelector('nav ul');
hamburger.addEventListener('click', () => {
nav.classList.toggle('show');
hamburger.classList.toggle('active');
});
</script>
</body>
</html>
CSS (styles.css)
/* Reset & Base Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Roboto', sans-serif;
line-height: 1.6;
color: #333;
}
/* Container */
.container {
width: 90%;
max-width: 1200px;
margin: auto;
}
/* Header */
header {
background-color: #0e153a;
color: #fff;
padding: 20px 0;
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}
header .container {
display: flex;
align-items: center;
justify-content: space-between;
}
.logo h1 {
font-size: 24px;
letter-spacing: 2px;
}
nav ul {
list-style: none;
display: flex;
}
nav ul li {
margin-left: 20px;
}
nav ul li a {
color: #fff;
text-decoration: none;
font-weight: 500;
transition: color 0.3s ease;
}
nav ul li a:hover {
color: #22d1ee;
}
/* Hamburger Menu */
.hamburger {
display: none;
flex-direction: column;
cursor: pointer;
}
.hamburger span {
height: 3px;
width: 25px;
background: #fff;
margin-bottom: 4px;
border-radius: 5px;
transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) {
transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
opacity: 0;
}
.hamburger.active span:nth-child(3) {
transform: rotate(-45deg) translate(5px, -5px);
}
/* Hero Section */
.hero {
background: linear-gradient(rgba(14,21,58,0.8), rgba(14,21,58,0.8)), url('hero-bg.jpg') no-repeat center center/cover;
height: 100vh;
display: flex;
align-items: center;
color: #fff;
text-align: center;
padding-top: 80px; /* Offset for fixed header */
}
.hero h2 {
font-size: 48px;
margin-bottom: 20px;
}
.hero p {
font-size: 18px;
margin-bottom: 30px;
}
.btn {
background-color: #3d5af1;
color: #fff;
padding: 12px 30px;
text-decoration: none;
border-radius: 25px;
transition: background-color 0.3s ease;
}
.btn:hover {
background-color: #22d1ee;
}
/* About Section */
.about {
padding: 80px 0;
background-color: #f9f9f9;
text-align: center;
}
.about h2 {
font-size: 36px;
margin-bottom: 20px;
color: #0e153a;
}
.about p {
font-size: 18px;
margin-bottom: 40px;
color: #555;
}
.about-content {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.about-item {
flex: 1 1 300px;
margin: 10px;
padding: 20px;
background-color: #e2f3f5;
border-radius: 8px;
}
.about-item h3 {
color: #3d5af1;
margin-bottom: 10px;
}
/* Services Section */
.services {
padding: 80px 0;
text-align: center;
}
.services h2 {
font-size: 36px;
margin-bottom: 40px;
color: #0e153a;
}
.services-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.service-item {
flex: 1 1 250px;
margin: 10px;
padding: 30px;
background-color: #fff;
border: 1px solid #e2f3f5;
border-radius: 8px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-item:hover {
transform: translateY(-10px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.service-item h3 {
color: #3d5af1;
margin-bottom: 15px;
}
.service-item p {
color: #555;
}
/* Testimonials Section */
.testimonials {
padding: 80px 0;
background-color: #f9f9f9;
text-align: center;
}
.testimonials h2 {
font-size: 36px;
margin-bottom: 40px;
color: #0e153a;
}
.testimonial-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.testimonial-item {
flex: 1 1 300px;
margin: 10px;
padding: 20px;
background-color: #fff;
border-left: 5px solid #3d5af1;
border-radius: 8px;
text-align: left;
}
.testimonial-item p {
font-style: italic;
color: #555;
margin-bottom: 15px;
}
.testimonial-item h4 {
color: #0e153a;
text-align: right;
}
/* Contact Section */
.contact {
padding: 80px 0;
text-align: center;
}
.contact h2 {
font-size: 36px;
margin-bottom: 40px;
color: #0e153a;
}
.contact form {
max-width: 600px;
margin: auto;
}
.form-group {
margin-bottom: 20px;
text-align: left;
}
.form-group input,
.form-group textarea {
width: 100%;
padding: 12px 15px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 16px;
}
.form-group input:focus,
.form-group textarea:focus {
border-color: #3d5af1;
outline: none;
}
.contact .btn {
background-color: #3d5af1;
color: #fff;
padding: 12px 30px;
border: none;
border-radius: 25px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.contact .btn:hover {
background-color: #22d1ee;
}
/* Footer */
footer {
background-color: #0e153a;
color: #fff;
padding: 20px 0;
text-align: center;
}
footer .social a {
margin: 0 10px;
display: inline-block;
}
footer .social img {
width: 24px;
height: 24px;
filter: invert(1);
transition: filter 0.3s ease;
}
footer .social a:hover img {
filter: invert(0.7);
}
/* Media Queries */
@media (max-width: 768px) {
nav ul {
flex-direction: column;
position: absolute;
top: 70px;
left: -100%;
width: 100%;
background-color: #0e153a;
transition: left 0.3s ease;
}
nav ul.show {
left: 0;
}
nav ul li {
margin: 20px 0;
text-align: center;
}
.hamburger {
display: flex;
}
.about-content,
.services-grid,
.testimonial-grid {
flex-direction: column;
align-items: center;
}
}
Assets
-
Hero Background Image (hero-bg.jpg):
- Use a professional image related to law or legal services.
- Ensure it's optimized for web use.
-
Social Icons:
- Place your social media icons (e.g., Facebook, Twitter, LinkedIn) in an
icons folder.
- Example file paths in the footer:
icons/facebook.svg
icons/twitter.svg
icons/linkedin.svg
You can use free icons from sources like Font Awesome or SVG Repo.
Responsive Behavior
-
Header:
- Displays a hamburger menu on screens smaller than 768px.
- Click the hamburger to toggle navigation links.
-
Grid Layouts:
- Stacks vertically on smaller screens for better readability.
Customization Tips
-
Colors:
- You can adjust colors in the CSS to better match your branding if needed.
-
Content:
- Replace placeholder text with actual information about your law firm.
-
Images:
- Update the hero section with a relevant background image.
- Ensure all images are optimized for faster loading times.
-
Icons:
- Update social media links to your firm's profiles.
This template provides a solid foundation for a modern law firm's website. You can further enhance it by adding JavaScript functionalities, animations, or integrating backend services as needed.
Feel free to customize the template to better fit your specific requirements!