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

              
                <h1>ALIGN-ITEMS</h1>
<h2>Esta propiedad se encarga de la alineación de los ítems a lo largo del eje Y.</h2>
<h3>stretch</h3>
<p>Alineación de los ítems por defecto.</p>
<section class="flex contenedor-stretch ">
	<div class="item">
		<h2>Título 1</h2>
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing.</p>
	</div>
	<div class="item">
		<h2>Título 2</h2>
		<p>Lorem ipsum dolor sit amet, consectetur.</p>
	</div>
	<div class="item">
		<h2>Título 3</h2>
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
	</div>
</section>

<h3>baseline</h3>
<p>Alinea los ítems dependiendo del contenido de cada ítem.</p>
<section class="flex contenedor-baseline">
	<div class="item">
		<h2>Título 1</h2>
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing.</p>
    <p><div>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ratione cumque necessitatibus accusamus corrupti voluptatibus omnis cupiditate, fuga velit nemo nihil, natus in eveniet nobis illum non. Exercitationem corrupti, id odit obcaecati vitae ipsa distinctio quasi suscipit neque, saepe accusantium debitis.</div></p>
	</div>
	<div class="item">
		<h2>Título 2</h2>
		<p>Lorem ipsum dolor sit amet, consectetur.</p>
	</div>
	<div class="item">
		<h2>Título 3</h2>
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
    <p><div>Lorem ipsum dolor sit amet consectetur adipisicing elit. Totam repudiandae minus nobis dolorum omnis, deserunt tenetur hic? Dolor, voluptates. Distinctio voluptatibus placeat ratione explicabo natus enim in eum quos fugiat eaque. Eaque, placeat vel!</div></p>
	</div>
</section>

<h3>center</h3>
<p>Centra los ítems.</p>
<section class="flex contenedor-center">
	<div class="item">
		<h2>Título 1</h2>
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing.</p>
	</div>
	<div class="item">
		<h2>Título 2</h2>
		<p>Lorem ipsum dolor sit amet, consectetur.</p>
	</div>
	<div class="item">
		<h2>Título 3</h2>
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
	</div>
</section>

<h3>flex-start</h3>
<p>Alinea los ítems de izquierda a derecha, desde la parte superior del contenedor padre.</p>
<section class="flex contenedor-flex-start">
	<div class="item">
		<h2>Título 1</h2>
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing.</p>
	</div>
	<div class="item">
		<h2>Título 2</h2>
		<p>Lorem ipsum dolor sit amet, consectetur.</p>
	</div>
	<div class="item">
		<h2>Título 3</h2>
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
	</div>
</section>

<h3>flex-end</h3>
<p>Alinea los ítems de izquierda a derecha, desde la parte inferior del contenedor padre.</p>
<section class="flex contenedor-flex-end">
	<div class="item">
		<h2>Título 1</h2>
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing.</p>
	</div>
	<div class="item">
		<h2>Título 2</h2>
		<p>Lorem ipsum dolor sit amet, consectetur.</p>
	</div>
	<div class="item">
		<h2>Título 3</h2>
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
	</div>
</section>
              
            
!

CSS

              
                body{
  padding: 1.5em;
}
.flex{
  display: flex;
  border: thin solid #ABA8A8;
}
section[class*="contenedor"]{
  height: 300px;
}
.contenedor-stretch{
  align-items: stretch;
}
.contenedor-baseline{
  align-items: baseline;
}
.contenedor-center{
  align-items: center;
}
.contenedor-flex-start{
  align-items: flex-start;
}
.contenedor-flex-end{
  align-items: flex-end;
}
.item{
  padding: 15px;
  &:first-child{
    background: #00D269;
  }
  &:nth-child(2){
    background: #00A854;
  }
  &:nth-child(3){
    background: #008040;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console