Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- 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>


              
            
!

CSS

              
                /*
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;
}
              
            
!

JS

              
                
              
            
!
999px

Console