# Half-Bleed Split

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

- Category: [CSS Layouts](https://copy-css.com/category/layouts)
- Tags: split screen, full bleed, container, image edge, hero
- Live preview: https://copy-css.com/snippets/half-bleed-split
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```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

```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;
  }
}
```

## Notes

- 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.
- Customize with: `--content`, `--gutter`.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
