Horizontal Blog Card with Thumbnail

Display your articles in a compact, space-saving format with this horizontal blog card.

This layout is an excellent choice for any area where a full vertical card is too large, such as in a sidebar list of recent posts, a "related articles" section at the end of a post, or for a dense, list-style blog index.

Screenshot of two horizontal blog cards with thumbnails, in a list format.

Get Source Code Preview

About this Component

This component arranges a thumbnail image and the article's text content side-by-side. To maintain a clean and uniform look, it features an optional CSS line-clamping technique that truncates longer titles and excerpts. The card is fully responsive, stacking vertically on mobile devices to ensure readability.

Features

Code Breakdown

HTML Structure

The entire card is an article. Inside, a single a tag makes the whole component clickable. The direct children of this link are the thumbnail img and a content div that holds the category, title, excerpt, and author footer.

CSS Styling

The main clickable link is a flex container (display: flex), which arranges the image and content block horizontally. The content block is also a flex container, but with flex-direction: column. This allows the footer to be pushed to the bottom of the card by setting margin-top: auto. This is a clean and simple way to achieve consistent vertical alignment of the bylines. The optional line-clamping is a modern CSS technique that uses display: -webkit-box, -webkit-box-orient: vertical, and -webkit-line-clamp to truncate text effectively.

Code

Here's the complete, self-contained code. It's ready to be used to build a compact and scannable list of your latest articles.

View Output