<section id="blog">
<h2>Our Latest Blog Posts</h2>
<div id="blog-post-feed">
<!-- Dynamic Blog Post Feed -->
<article>
<h3>Blog Post Title 1</h3>
<p>Excerpt from the blog post...</p>
<a href="blog-post1.html">Read more</a>
</article>
<article>
<h3>Blog Post Title 2</h3>
<p>Excerpt from the blog post...</p>
<a href="blog-post2.html">Read more</a>
</article>
<article>
<h3>Blog Post Title 3</h3>
<p>Excerpt from the blog post...</p>
<a href="blog-post3.html">Read more</a>
</article>
</div>
</section>
<section id="testimonials">
<h2>What Our Clients Say</h2>
<div id="testimonials-list">
<!-- Testimonials Section -->
<blockquote>
<p>"This service transformed our business!"</p>
<cite>- Client Name</cite>
</blockquote>
<blockquote>
<p>"Highly recommend! The team is fantastic."</p>
<cite>- Client Name</cite>
</blockquote>
<blockquote>
<p>"A great experience from start to finish."</p>
<cite>- Client Name</cite>
</blockquote>
</div>
</section>
<section id="newsletter-signup">
<h2>Subscribe to Our Newsletter</h2>
<form action="subscribe.php" method="post">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<button type="submit">Subscribe</button>
</form>
</section>
Here the css code:
/* Base Styles */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
line-height: 1.6;
color: #333;
background-color: #f9f9f9;
}
header {
background-color: #333;
color: #fff;
padding: 10px 20px;
text-align: center;
}
h1, h2, h3 {
margin: 10px 0;
}
nav {
display: none; /* Hidden by default */
}
nav ul {
list-style: none;
padding: 0;
}
nav ul li {
display: inline;
margin: 0 15px;
}
nav ul li a {
color: #fff;
text-decoration: none;
}
#blog, #testimonials, #newsletter-signup {
padding: 20px;
margin: 20px 0;
}
#blog-post-feed {
display: grid;
grid-template-columns: 1fr;
gap: 20px;
}
article {
background-color: #fff;
padding: 15px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
blockquote {
background-color: #f0f0f0;
padding: 15px;
border-left: 5px solid #333;
margin: 10px 0;
}
form {
display: flex;
flex-direction: column;
}
input[type="email"] {
padding: 10px;
margin-bottom: 10px;
}
button {
padding: 10px;
background-color: #333;
color: #fff;
border: none;
cursor: pointer;
}
/* Social Media Icons /
#social-media a img {
width: 30px; / Icon width */
margin: 0 10px;
}
/* Footer Styling */
footer {
text-align: center;
padding: 20px 10px;
background-color: #333;
color: #fff;
}
/* Responsive Styles /
@media (min-width: 600px) {
nav {
display: block; / Show navigation on larger screens */
}
nav ul {
text-align: center;
}
#blog-post-feed {
grid-template-columns: repeat(2, 1fr); /* Two columns on tablets */
}
}
@media (min-width: 900px) {
#blog-post-feed {
grid-template-columns: repeat(3, 1fr); /* Three columns on larger screens */
}
nav ul {
text-align: right;
}
}
/* Hamburger Menu Styles */
.hamburger {
display: flex;
flex-direction: column;
cursor: pointer;
}
.hamburger div {
height: 4px;
width: 25px;
background-color: white;
margin: 4px 0;
}
/* Show the navigation menu when the hamburger is clicked (you'll need JS for this) */
nav.active {
display: block;
}
/* Specific styles for the header's background image /
header {
background-image: url('header-background.jpg'); / Change this to your image */
background-position: center;
background-size: cover;
color: white;
}
/* Add padding around header elements for mobile */
header h1, header nav {
padding: 10px;
}