×

Save Your Code

If you click the save button, your code will be saved, and you get an URL you can share with others.

By clicking the "Save" button you agree to our terms and conditions.

Report Error

×

Save to Google Drive

If you have a Google account, you can save this code to your Google Drive.

Google will ask you to confirm Google Drive access.

×

Open from Google Drive

If you have saved a file to Google Drive, you can open it here:

Result Size: 625 x 571
x
 
<!DOCTYPE html>
<html>
<head>
<style> 
.flex-container {
  display: -webkit-flex;
  display: flex;  
  -webkit-flex-flow: row wrap;
  flex-flow: row wrap;
  font-weight: bold;
  text-align: center;
}
.flex-container > * {
  padding: 10px;
  flex: 1 100%;
}
.main {
  text-align: left;
  background: cornflowerblue;
}
.header {background: coral;}
.footer {background: lightgreen;}
.aside1 {background: moccasin;}
.aside2 {background: violet;}
@media all and (min-width: 768px) {
  .aside { flex: 1 auto; }
  .main    { flex: 3 0px; }
  .aside1 { order: 1; } 
  .main    { order: 2; }
  .aside2 { order: 3; }
  .footer  { order: 4; }
}
</style>
</head>
<body>
<div class="flex-container">
  <header class="header">Header</header>
  <aside class="aside aside1">Aside 1</aside>
  <article class="main">
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed ex turpis. Cras luctus nibh lectus, in ullamcorper ex tempor eleifend. Nulla bibendum, eros a consequat vestibulum, orci massa fermentum quam, sed commodo nunc ex vitae nisl. Aliquam ullamcorper interdum est nec tincidunt.</p>
  </article>
  <aside class="aside aside2">Aside 2</aside>
  <footer class="footer">Footer</footer>
×

Report a Problem: