<div class="container">
  <p class="viewport">Viewport width: <span class="c-viewport__width" id="vpWidth"></span>px
  </p>
  <div class="flex-wrapper">
    <div class="element main">
      <h2>Main</h2>
      <p>Gingerbread soufflé brownie pie marzipan. Gummies pie pudding icing chocolate cake apple pie chocolate bar. Sweet marzipan powder lollipop gummi bears chupa chups jelly beans marshmallow. Tootsie roll chocolate cake marshmallow. Sesame snaps pastry cotton candy tart applicake. Candy lemon drops cheesecake jelly cake jelly beans oat cake biscuit.</p>
      <p>Apple pie cupcake wafer pie ice cream sugar plum caramels tart brownie. Chocolate cake cotton candy tiramisu lollipop. Carrot cake biscuit wafer jelly soufflé sesame snaps gummi bears.</p> 
    </div>

    <div class="element sidebar">
      <h2>Sidebar</h2>
      <p>Pudding bear claw chocolate cake gingerbread candy bear claw jelly wafer applicake. Candy jelly beans lollipop tootsie roll applicake lemon drops. Croissant croissant cupcake chupa chups sweet applicake cheesecake biscuit cotton candy.</p>
    </div>
  </div>
</div>
html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
	background: #f1f1f1;
  font-size: 1.1em;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.container {
  margin: 2em auto;
  max-width: 45em;
  border: 1px solid #aaa;
  padding: 1em;
}

.container::after {
  display: block;
  clear: both;
  content: '';
}

.element {
  padding: 1em;
  background-color: white;
}

.viewport {
  position: absolute;
  font-size: 75%;
  padding: 5px;
  color: grey;
  background: white;
  top: 0;
  left: calc(50% - 70px);
  border-radius: 11px;
  box-shadow: 1px 1px 5px 0px rgba(0,0,0,0.25);
}

@media (min-width: 35em) {
  .main {
    width: 67%;
    float: left;
  }

  .sidebar {
    width: 33%;
    float: right;
  }
}