About this snippet

We designed this split-screen layout to look professional on desktops yet stack perfectly on mobile phones. It gives your users a modern entry point, which builds trust immediately.

Size
2.0 KB
Uses
HTML, CSS
Loads
Nothing external
Views
578
<div class="split-screen">
  <div class="left-pane">
    <div class="welcome-text">
      <h1>Welcome Back</h1>
      <p>We are glad to see you again.</p>
    </div>
  </div>
  <div class="right-pane">
    <form class="login-form">
      <h2>Sign In</h2>
      <div class="input-group">
        <label>Email Address</label>
        <input type="email" placeholder="name@example.com">
      </div>
      <div class="input-group">
        <label>Password</label>
        <input type="password" placeholder="••••••••">
      </div>
      <button type="submit" class="login-btn">Login</button>
    </form>
  </div>
</div>
* {
  box-sizing: border-box;
}
.split-screen {
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  display: flex;
  min-height: 500px;
  height: 100vh;
  background: #fff;
}
.left-pane {
  flex: 1;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.right-pane {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form {
  width: 100%;
  max-width: 350px;
}
.login-form h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #1f2937;
}
.input-group {
  margin-bottom: 20px;
}
.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #4b5563;
}
.input-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}
.input-group input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.login-btn {
  width: 100%;
  padding: 12px;
  background: #111827;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.login-btn:hover {
  background: #000;
}
@media (max-width: 768px) {
  .split-screen {
    flex-direction: column;
  }
  .left-pane {
    display: none;
  }
}
Esc
↑↓ moveEnter select

Start from a template

Open an .html file, or HTML, CSS, JS, Markdown, Less or TypeScript files. You can also drop them here. Styles and scripts go into their panes.

Share

Source

Keyboard shortcuts

Save