Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!-- Don't forget, you must set a height to your main container -->
<div class="main-container column-center-center">
  <p class="content">
    Main axis is (Y) because flex-direction: column; <br>
    El eje principal es (Y) debido a flex-direction: column;
  </p>
</div>

<!-- No olvides establecer un alto para tu contenedor principal -->
<div class="main-container--two flex-center-center">
  <p class="content">
      Main axis is (X) by default. <br>
      El eje principal es (X) por defecto.
  </p>
</div>


            
          
!
            
              /*
ENGLISH
Classes for the main axis by default starts with "flex-" then you set (Y) axis and (X) axis in that order.
Example: .flex-top-center , top is the (Y) axis and center is the(X) axis

Classes for the main axis when flex-direction: column , starts with "column-" then you set (Y) axis and (X) axis in that order.
Example: .column-bottom-right , bottom is the (Y) axis and right is the (X) axis

ESPAÑOL
Las clases para el eje principal por defecto, comienzan con "flex-" luego estableces el eje (Y) , y el eje (X) , en ese orden.
Ejemplo: .flex-top-center , top es el eje (Y) y center es el eje (X)

Las clases para el eje principal cuando usas flex-direction: column , comienzan con "column-" luego estableces el eje (Y) , y el eje (X) , en ese orden.
Ejemplo: .column-bottom-left , bottom es el eje (Y) y left es el eje (X)
*/

.flex-top-left,
.flex-center-left,
.flex-bottom-left,
.flex-top-center,
.flex-center-center,
.flex-bottom-center,
.flex-top-right,
.flex-center-right,
.flex-bottom-right,
.column-top-left,
.column-center-left,
.column-bottom-left,
.column-top-center,
.column-center-center,
.column-bottom-center,
.column-top-right,
.column-center-right,
.column-bottom-right {
    display: flex;
    width: 100%;
    height: 100%;
}

.column-top-left,
.column-center-left,
.column-bottom-left,
.column-top-center,
.column-center-center,
.column-bottom-center,
.column-top-right,
.column-center-right,
.column-bottom-right {
    flex-direction: column;
}

.flex-top-left,
.flex-center-left,
.flex-bottom-left {
    justify-content: left;
}

.flex-top-center,
.flex-center-center,
.flex-bottom-center,
.column-center-left,
.column-center-center,
.column-center-right {
    justify-content: center;
}

.flex-top-right,
.flex-center-right,
.flex-bottom-right {
    justify-content: right;
}

.flex-top-center,
.flex-top-right,
.flex-top-left,
.column-top-left,
.column-center-left,
.column-bottom-left {
    align-items: flex-start;
}

.flex-center-center,
.flex-center-right,
.flex-center-left,
.column-top-center,
.column-center-center,
.column-bottom-center {
    align-items: center;
}

.flex-bottom-center,
.flex-bottom-right,
.flex-bottom-left {
    align-items: flex-end;
}

.column-bottom-left,
.column-bottom-center,
.column-bottom-right {
    justify-content: flex-end;
}

.column-top-right,
.column-center-right,
.column-bottom-right {
    align-items: flex-end;
}

/* 
    The only important thing here is that the main container must have a height.
    
    Lo  único importante aquí es que el contenedor principal debe tener un alto
*/

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.main-container,
.main-container--two {
    height: 200px;
    background-color: rgb(12, 92, 146);
}

.main-container--two {
    background-color: rgb(0, 133, 122);
    margin-top: 50px;
}

.content {
    color: #fff;
    font-size: 20px;
    border: 2px solid #fff;
    padding: 5px 10px;
    margin: 10px;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console