SolutionsCase StudiesAI ToolsResourcesAboutContact
Get Your Free AI Automation Audit Book a Free 30-Minute Strategy Call
Playground~/frontend Open editor

~/css/split-screen-layouts

7 CSS Split Screen Layouts

7 Pure CSSPublished 2026-10-05Free · no sign-up

Seven split screen layouts: a sign-up page with a brand image half, a split hero, a choice between two audiences, halves that expand when hovered, a sticky picture beside scrolling text, a diagonal split and a section that puts the image first on phones.

01. Sign-up Split with Image Half

Split screenForm

One half is a brand image with a short quote, the other is the form. Below 480px of container width the image half shrinks to a banner above the form so the form is never pushed off screen on a phone.

View code
<div class="spl1"><div class="in"><div class="art"><p>“The fastest checkout we have used.”</p></div><form><h3>Create your account</h3><label>Email<input type="email" autocomplete="email"></label><label>Password<input type="password" autocomplete="new-password"></label><button type="button">Sign up</button></form></div></div>
.spl1 { width: 600px; max-width: 100%; container-type: inline-size; font: 14px Inter, system-ui, sans-serif; }
.spl1 .in { display: grid; border-radius: 16px; overflow: hidden; border: 1px solid #e4e7ec; background: #fff; }
.spl1 .art { display: grid; align-items: end; min-height: 90px; padding: 16px; background: linear-gradient(160deg, #4338ca, #db2777); color: #fff; }
.spl1 .art p { margin: 0; font-weight: 700; font-size: 15px; }
.spl1 form { display: grid; gap: 10px; padding: 20px; color: #101828; }
.spl1 h3 { margin: 0 0 4px; font-size: 18px; }
.spl1 label { display: grid; gap: 4px; font-weight: 600; }
.spl1 input { min-width: 0; padding: 9px 10px; border: 1px solid #98a2b3; border-radius: 8px; font: inherit; }
.spl1 button { padding: 10px; border: 0; border-radius: 8px; background: #4338ca; color: #fff; font: 700 14px Inter, system-ui, sans-serif; cursor: pointer; }
.spl1 :focus-visible { outline: 3px solid #a5b4fc; outline-offset: 2px; }
@container (min-width: 480px) { .spl1 .in { grid-template-columns: 1fr 1fr; } .spl1 .art { min-height: 300px; } }

02. Split Hero, Text and Visual

Split screenHero

A full-height hero divided into a text half and a visual half, with the text vertically centred. The visual is a bleed panel that touches the edges, which feels more confident than an image floating in a box.

View code
<section class="spl2"><div class="in"><div class="tx"><p class="k">New</p><h3>Notes that organise themselves</h3><a href="#try">Try it free</a></div><div class="vis" aria-hidden="true"><span></span><span></span><span></span></div></div></section>
.spl2 { width: 600px; max-width: 100%; container-type: inline-size; font-family: Inter, system-ui, sans-serif; }
.spl2 .in { display: grid; border-radius: 18px; overflow: hidden; background: #0f172a; }
.spl2 .tx { display: grid; align-content: center; gap: 10px; padding: 24px; }
.spl2 .k { margin: 0; color: #fbbf24; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.spl2 h3 { margin: 0; color: #fff; font-size: 26px; line-height: 1.15; }
.spl2 a { justify-self: start; padding: 10px 16px; border-radius: 8px; background: #fbbf24; color: #1c1917; font-weight: 800; font-size: 14px; text-decoration: none; }
.spl2 a:focus-visible { outline: 3px solid #fde68a; outline-offset: 2px; }
.spl2 .vis { display: grid; gap: 8px; align-content: center; min-height: 160px; padding: 24px; background: linear-gradient(135deg, #1e40af, #7c3aed); }
.spl2 .vis span { height: 30px; border-radius: 8px; background: rgba(255,255,255,.85); } .spl2 .vis span:nth-child(2) { width: 75%; } .spl2 .vis span:nth-child(3) { width: 55%; }
@container (min-width: 480px) { .spl2 .in { grid-template-columns: 1fr 1fr; min-height: 300px; } }

03. Two Audiences, Two Halves

Split screenChoice

A split for two audiences, such as buyers and sellers, with a dark half and a light half, each with its own heading and link. The halves are equal flex items, so they share the width and stack when there is no room.

View code
<div class="spl3"><a class="d" href="#buy"><b>I want to buy</b><span>Browse 4,000 makers →</span></a><a class="l" href="#sell"><b>I want to sell</b><span>Open a shop in minutes →</span></a></div>
.spl3 { display: flex; flex-wrap: wrap; width: 560px; max-width: 100%; border-radius: 16px; overflow: hidden; font: 14px Inter, system-ui, sans-serif; }
.spl3 a { flex: 1 1 200px; display: grid; gap: 6px; padding: 30px 22px; text-decoration: none; }
.spl3 .d { background: #101828; color: #98a2b3; } .spl3 .d b { color: #fff; }
.spl3 .l { background: #f2f4f7; color: #475467; } .spl3 .l b { color: #101828; }
.spl3 b { font-size: 22px; }
.spl3 a:focus-visible { outline: 3px solid #84adff; outline-offset: -3px; }

04. Halves That Expand on Hover

Split screenInteraction

Two halves share the space equally until one is hovered or focused, when it grows to take two thirds. The halves are flex items whose flex-grow transitions, so the whole thing is two lines of CSS on top of the layout.

View code
<div class="spl4"><a href="#city" style="--g:linear-gradient(160deg,#6366f1,#1e1b4b)"><b>City breaks</b></a><a href="#coast" style="--g:linear-gradient(160deg,#06b6d4,#164e63)"><b>Coast and islands</b></a></div>
.spl4 { display: flex; width: 560px; max-width: 100%; height: 220px; border-radius: 16px; overflow: hidden; font-family: Inter, system-ui, sans-serif; }
.spl4 a { flex: 1; display: grid; align-items: end; padding: 18px; background: var(--g); color: #fff; text-decoration: none; transition: flex-grow .45s cubic-bezier(.2,.8,.2,1); }
.spl4 a:hover, .spl4 a:focus-visible { flex-grow: 2; }
.spl4 b { font-size: 18px; }
.spl4 a:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) { .spl4 a { transition: none; } }

05. Sticky Media, Scrolling Text

Split screenSticky

A product story where the picture half stays put while the text half scrolls through the details, the layout of many launch pages. The picture column is position: sticky with align-self: start inside the grid.

View code
<div class="spl5" tabindex="0" role="region" aria-label="Product story, scroll"><div class="in"><div class="pic" aria-hidden="true"></div><div class="tx"><h3>The everyday pack</h3><p>Recycled ripstop shell that shrugs off rain.</p><p>A padded sleeve that fits a 16-inch laptop.</p><p>Hidden pocket for your passport.</p><p>Straps that tuck away for flights.</p></div></div></div>
.spl5 { box-sizing: border-box; width: 520px; max-width: 100%; height: 300px; overflow-y: auto; border: 1px solid #e4e7ec; border-radius: 16px; background: #fff; font: 14px/1.6 Inter, system-ui, sans-serif; container-type: inline-size; }
.spl5:focus-visible { outline: 3px solid #84adff; outline-offset: 2px; }
.spl5 .in { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 14px; }
.spl5 .pic { position: sticky; top: 14px; align-self: start; aspect-ratio: 3 / 4; border-radius: 12px; background: radial-gradient(ellipse at 50% 40%, #fcd34d, #b45309 70%); }
.spl5 h3 { margin: 0 0 8px; color: #101828; } .spl5 p { margin: 0 0 90px; color: #475467; }
@container (max-width: 380px) { .spl5 .in { grid-template-columns: 1fr; } .spl5 .pic { position: static; aspect-ratio: 16 / 9; } .spl5 p { margin-bottom: 16px; } }

06. Diagonal Split

Split screenClip-path

Two panels divided by a slanted line instead of a straight one. The coloured panel is clipped with a polygon so its edge leans, and the text sits in its own grid cell so it never runs into the slope.

View code
<section class="spl6"><div class="a"><h3>Before</h3><p>Manual exports every Monday.</p></div><div class="b"><h3>After</h3><p>Reports land in your inbox at 8am.</p></div></section>
.spl6 { display: grid; grid-template-columns: 1fr 1fr; width: 540px; max-width: 100%; border-radius: 16px; overflow: hidden; font: 14px Inter, system-ui, sans-serif; }
.spl6 > div { padding: 30px 18px; }
.spl6 .a { background: #27272a; color: #a1a1aa; } .spl6 .a h3 { color: #f4f4f5; }
.spl6 .b { margin-left: -40px; padding-left: 58px; background: #84cc16; color: #1a2e05; clip-path: polygon(40px 0, 100% 0, 100% 100%, 0 100%); }
.spl6 h3 { margin: 0 0 4px; font-size: 20px; } .spl6 p { margin: 0; }

07. Image First on Phones

Split screenResponsive

On wide screens the text is on the left and the image on the right, but on phones the image comes first so people see what the section is about before reading. The order is changed with grid placement, not by duplicating the image.

View code
<section class="spl7"><div class="in"><div class="tx"><h3>Ride further</h3><p>Our e-bike battery lasts 120 km on a single charge.</p></div><div class="im" role="img" aria-label="Electric bike on a coastal road"></div></div></section>
.spl7 { width: 560px; max-width: 100%; container-type: inline-size; font: 14px/1.6 Inter, system-ui, sans-serif; }
.spl7 .in { display: grid; gap: 14px; }
.spl7 .im { order: -1; aspect-ratio: 16 / 9; border-radius: 14px; background: linear-gradient(#bae6fd 0 50%, #0ea5e9 50% 70%, #a8a29e 70%); }
.spl7 h3 { margin: 0 0 6px; color: #101828; font-size: 22px; } .spl7 p { margin: 0; color: #475467; }
@container (min-width: 460px) { .spl7 .in { grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; } .spl7 .im { order: 0; aspect-ratio: 4 / 3; } }

About these CSS Split Screen Layouts

Two jobs, two halves

A split screen works when each half does one thing: one shows, the other tells or asks. If both halves compete for attention, the page loses its focus.

Plan the mobile stack

Every split becomes a stack on a phone. Decide which half comes first, and shrink decorative halves to a banner rather than a full screen so the useful half is not pushed out of view.

Equal halves with flex or grid

grid-template-columns: 1fr 1fr gives exact halves; flex items with flex: 1 share space and can grow on hover by transitioning flex-grow.

Keep text off busy images

Put text in its own half rather than over the picture. When text must sit on an image, add a scrim so it keeps enough contrast.

Frequently asked questions

Should both halves be full height?

On wide screens it looks strong; on phones let the halves size to their content.

How do I make one side stay while the other scrolls?

Make the media column position: sticky with align-self: start, as the sticky demo does.

Are diagonal splits accessible?

Yes, they are only a visual edge; keep the text clear of the slope.