CSS Half-Bleed Split

Text stays aligned to the page container while the image half runs all the way to the edge of the screen.

  • split screen
  • full bleed
  • container
  • image edge
  • hero
HTML
<section class="half-bleed">
  <div class="half-bleed-text">
    <h2>Made for makers</h2>
    <p>Text keeps to the page grid. The image runs to the edge.</p>
  </div>
  <div class="half-bleed-media"></div>
</section>
CSS
.half-bleed {
  --content: 1100px;
  --gutter: 24px;
  display: grid;
  grid-template-columns:
    minmax(var(--gutter), 1fr)
    minmax(0, calc(var(--content) / 2))
    minmax(0, calc(var(--content) / 2))
    minmax(var(--gutter), 1fr);
  align-items: center;
  font: 16px/1.5 system-ui, sans-serif;
}

.half-bleed-text {
  grid-column: 2;
  padding-right: 10%;
  color: #44403c;
}

.half-bleed-text h2 {
  margin: 0 0 8px;
  color: #1c1917;
  font-size: 32px;
  line-height: 1.1;
}

.half-bleed-text p {
  margin: 0;
}

/* From the middle of the container to the right edge of the screen */
.half-bleed-media {
  grid-column: 3 / -1;
  align-self: stretch;
  min-height: 360px;
}

.half-bleed-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 720px) {
  .half-bleed {
    grid-template-columns: var(--gutter) 1fr var(--gutter);
    row-gap: 24px;
  }

  .half-bleed-text {
    padding: 0;
  }

  .half-bleed-media {
    grid-column: 1 / -1;
    min-height: 240px;
  }
}

About this CSS Half-Bleed Split

This CSS Half-Bleed Split is 58 lines of pure CSS (1.0 KB) with no JavaScript and no dependencies. It uses CSS Grid and custom properties. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.

CSS features used

Customize it

Change these custom properties to restyle the half-bleed split without touching the rest of the CSS:

PropertyDefault
--content1100px
--gutter24px

How to use this half-bleed split

  1. Copy the HTML and paste it where you want the element to appear.
  2. Copy the CSS into your stylesheet, or inside a <style> tag.
  3. Keep the .half-bleed class name, or rename it in both places. Then tweak colors, sizes and timing to match your design.
  4. Using React or Next.js? Change class to className in the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).

Building with an AI tool?

“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.

Feedback