This project is a blog post card built as part of the FreeCodeCamp “Styling Backgrounds and Borders” lab.
The goal of the lab was to practice using CSS to style backgrounds, borders, images, and interactive elements while following specific structural requirements.
The card presents an astronomy-themed blog post featuring:
- a cover image
- a title and short excerpt
- a call-to-action button
The design focuses on clean layout, visual hierarchy, and simple hover interactions.
- A
.blog-post-cardcontainer holding all card elements - An image with a valid
altattribute and the class.post-img - A
.post-contentsection containing:- a
.post-titleheading - a
.post-excerptparagraph - a
.read-morelink styled as a button
- a
- A non-white background applied to the
body - Rounded corners, custom width, and text alignment on the card
- A full-width image with a bottom border
- Padding inside the content section
- Custom text colors and margins for title and excerpt
- A styled “Read More” button with:
- background color
- padding and margins
- rounded corners
inline-blockdisplay- hover effect
- HTML5
- CSS3
- Styling backgrounds and borders
- Working with images inside containers
- Button styling and hover effects
- Basic layout control and spacing
- Rebuild the layout using Flexbox or Grid
- Create multiple blog post cards
- Improve responsiveness
- Add a contact page or additional content sections