Skip to content

Horizontal Card

Three Bootstrap 5 horizontal cards with the image on the left: an article card, a listing card with rating and price, and a compact course card.

Also known as: horizontal card layout, card with image on left, listing card, blog card with side image

Bootstrap 5 Cards Responsive #blog #card #horizontal #listing #responsive

Horizontal Card live demo

Open in new tab

Bootstrap 5 code (HTML, CSS, JS)

A set of three Bootstrap 5 horizontal cards with the image on the left and content on the right: a blog article card, a listing card with rating, features and price, and a compact course card with a progress bar. Use them in blog indexes, search results, booking sites and learning dashboards.

How it works

The cards sit in .hc-list, a one-column grid limited to 920px. Each article.card.hc-card uses a Bootstrap row g-0: the image column (col-md-5 col-lg-4) contains .hc-media, and the content column contains .hc-body, a flex column that pushes .hc-meta or .hc-footer to the bottom. On phones the columns stack and the image keeps a fixed ratio from --hc-img-ratio. From the md breakpoint the image is positioned absolutely and covers the whole column with object-fit: cover, so it always matches the height of the text.

The article card and the compact card use Bootstrap's stretched-link on the title, so the whole card is clickable. The .hc-card--listing variant has a real button instead, a .hc-badge over the photo, a .hc-rating line and .hc-features pills. The .hc-card--compact variant keeps a small square thumbnail next to the text even on phones. Hovering a card lifts it, deepens the shadow and zooms the image slightly. A small script reads aria-valuenow from each progress bar in .hc-progress, sets the width of .hc-progress__bar and fills .hc-progress__value, so the value is defined in one place.

Customization

  • --hc-accent and --hc-accent-hover in .hc-list: change the kicker, link hover, avatar, button, focus outline and progress color.
  • --hc-img-ratio in .hc-list: set the image ratio of stacked cards on phones, e.g. 4 / 3 or 1 / 1.
  • --hc-radius in .hc-list: make the corners rounder or set 0.5rem for a sharper look.
  • --hc-thumb in .hc-list (phones) and in the .hc-card--compact rule inside the min-width: 576px media query (larger screens): resize the square thumbnail of the compact card.
  • col-md-5 col-lg-4 on the image column and col-md-7 col-lg-8 on the text column: use col-md-4 and col-md-8 for a narrower image on tablets.
  • aria-valuenow="58" on the progress bar: set the course progress; the bar and percentage update on load.
  • background: #e2e8f0 in .hc-media: change the placeholder color shown while images load.

Use cases

  • Blog indexes: an article card with the image on the left suits a list of posts
  • Booking sites: a listing card shows a photo, rating, feature pills and price with a button
  • Search results: the stacked one-column layout keeps every result easy to scan
  • Learning dashboards: a compact course card includes a progress bar and a small thumbnail

Accessibility

Each card is an article with a heading. Thumbnails that only repeat the title use an empty alt, while the listing photo has descriptive alt text. When a stretched link receives keyboard focus, :has(.stretched-link:focus-visible) draws an outline around the whole card. The rating includes visually hidden "out of 5" text, the date uses a time element, and the progress bar has role="progressbar" with aria-label and value attributes. Icons and initials are aria-hidden. Hover lift and image zoom are disabled with prefers-reduced-motion: reduce.

Usage notes

Requires Bootstrap 5 and Bootstrap Icons. The script is only needed for the progress bar; without it the bar stays empty.

Horizontal Card at a glance

Framework
Bootstrap 5
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 5, Bootstrap Icons
Layout
Responsive, works on mobile
Category
Cards
License
Free for personal and commercial use

Questions about this template

Can I use the Horizontal Card code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 5 and Bootstrap Icons from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
  • <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
Horizontal Card – free Bootstrap 5 card template
Horizontal Card · free Bootstrap 5 card template

More Cards

3D Flip Card – free Pure CSS card template

3D Flip Card

Three pure CSS 3D flip cards that turn on hover, keyboard focus or tap to reveal details and a link on the back.

Event Card with Photo and Date Badge – free Pure CSS card template

Event Card with Photo and Date Badge

Pure CSS event cards with a cover photo, ticket-stub date badge, category chip, time and venue details, price and a ticket button.

Cards with Hover Lift – free Pure CSS card template

Cards with Hover Lift

Pure CSS blog card grid where each card lifts with a deeper shadow and zooms its image on hover or keyboard focus.

Blog Post Card – free Tailwind CSS card template

Blog Post Card

Tailwind CSS blog post card with cover illustration, category badge, date, reading time, clamped excerpt, author row and a fully clickable area.

Card with Image Overlay Text – free Bootstrap 6 card template

Card with Image Overlay Text

Dark Bootstrap 6 travel cards with headline, place and price set over full-bleed photos, a gradient scrim for readability, save buttons and a Toast.

Glassmorphism Card – free Tailwind CSS card template

Glassmorphism Card

Frosted glass profile card in Tailwind CSS with backdrop blur, a light reflection and a follow button over colorful animated gradient blobs.