Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<section class="section">
  <div class="section__inner container">
    <div class="text-block">
      <h2>Lorem ipsum.</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officiis sequi nam temporibus quibusdam possimus repudiandae veritatis, in autem! Repellat maiores quia neque aspernatur libero consequatur quod provident, explicabo voluptatum dolor!</p>
    </div>
  </div>
</section>
</body>
</html>
 
body {
  margin: 0;
  font: 100%/1.4 sans-serif;
}
.container {
  margin-left: auto;
  margin-right: auto;
  max-width: 960px;
}
.section {
  position: relative;
  height: 100vh;
  color: #FFF;
  background-color: #FFC056;
}
  .section::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 50%;
    background: url("http://placeimg.com/400/400") no-repeat 50% / cover;
  }
  .section__inner {
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
}
.text-block {
  box-sizing: border-box;
  padding: 2em;
  width: 50%;
  margin-left: 50%;
}
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers