# Diagonal Split Screen

> A two-sided hero cut by a diagonal line with clip-path, each side holding its own message and link.

- Category: [CSS Layouts](https://copy-css.com/category/layouts)
- Tags: split screen, clip-path, diagonal, hero, two audiences
- Live preview: https://copy-css.com/snippets/diagonal-split
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<section class="diag-split">
  <div class="diag-split-a">
    <h2>For buyers</h2>
    <a href="#">Shop now</a>
  </div>
  <div class="diag-split-b">
    <h2>For sellers</h2>
    <a href="#">Start selling</a>
  </div>
</section>
```

## CSS

```css
.diag-split {
  display: grid;
  min-height: 60vh;
  font: 15px/1.3 system-ui, sans-serif;
}

/* Both halves share one grid cell; the second is cut diagonally */
.diag-split > * {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 40px;
}

.diag-split h2 {
  margin: 0;
  font-size: 28px;
}

.diag-split a {
  color: inherit;
  font-weight: 700;
}

.diag-split a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.diag-split-a {
  align-items: flex-start;
  padding-right: 55%;
  background: #fef3c7;
  color: #78350f;
}

.diag-split-b {
  align-items: flex-end;
  padding-left: 55%;
  background: #1e1b4b;
  color: #e0e7ff;
  text-align: right;
  clip-path: polygon(58% 0, 100% 0, 100% 100%, 42% 100%);
}

/* Phones: stack, with a slanted top edge on the second half */
@media (max-width: 560px) {
  .diag-split > * {
    grid-area: auto;
    padding: 32px 24px;
  }

  .diag-split-b {
    margin-top: -24px;
    clip-path: polygon(0 24px, 100% 0, 100% 100%, 0 100%);
  }
}
```

## Notes

- This CSS Diagonal Split Screen is 59 lines of pure CSS (1.0 KB) with no JavaScript and no dependencies. It uses clip paths, CSS Grid, Flexbox and keyboard focus styles.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
