<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>flexbox &#8211; danisanchez.net</title>
	<atom:link href="https://danisanchez.net/tag/flexbox/feed/" rel="self" type="application/rss+xml" />
	<link>https://danisanchez.net</link>
	<description></description>
	<lastBuildDate>Sun, 30 Mar 2025 09:35:15 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://danisanchez.net/wp-content/uploads/2026/07/cropped-favicon-32x32.png</url>
	<title>flexbox &#8211; danisanchez.net</title>
	<link>https://danisanchez.net</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Guía rápida de Flexbox</title>
		<link>https://danisanchez.net/guia-rapida-de-flexbox/</link>
					<comments>https://danisanchez.net/guia-rapida-de-flexbox/#respond</comments>
		
		<dc:creator><![CDATA[dani.sanchez]]></dc:creator>
		<pubDate>Sun, 30 Mar 2025 09:35:15 +0000</pubDate>
				<category><![CDATA[Tutoriales]]></category>
		<category><![CDATA[flexbox]]></category>
		<guid isPermaLink="false">https://danisanchez.net/?p=13666</guid>

					<description><![CDATA[1. Contenedor básico de tipo flex con 5 elementos 2. Dirección Flex (row, column) 2.1 row (por defecto) 2.2 row-reverse 2.3 column 2.4 column-reverse 3. Filas (flex-wrap) 3.1 frex-wrap: nowrap (por defecto) Los elemenos adaptan su tamaño para caber en la fila. 3.2 flex-wrap: wrap Los elementos respetan su ancho (300px) y ocupan otra fila [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">1. Contenedor básico de tipo flex con 5 elementos</h2>



<pre class="wp-block-code"><code>&lt;div class="contenedor"&gt;
    &lt;div class="elemento"&gt;a&lt;/div&gt;
    &lt;div class="elemento"&gt;b&lt;/div&gt;
    &lt;div class="elemento"&gt;c&lt;/div&gt;
    &lt;div class="elemento"&gt;d&lt;/div&gt;
    &lt;div class="elemento"&gt;e&lt;/div&gt;
&lt;/div&gt;</code></pre>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
}

.elemento{
    width: 300px;
    padding: 30px;
    font-size: 30px;
    font-weight: bold;
    text-align: center;
    color: #666;
}

/*para elementos impares*/
.elemento:nth-child(odd){
    background-color: #000;
}

/*para elementos ppares*/
.elemento:nth-child(even){
    background-color: #fff;
}</code></pre>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="886" height="542" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-01.webp" alt="" class="wp-image-13667" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-01.webp 886w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-01-300x184.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-01-768x470.webp 768w" sizes="(max-width: 886px) 100vw, 886px" /></figure>



<h2 class="wp-block-heading">2. Dirección Flex (row, column)</h2>



<h3 class="wp-block-heading">2.1 <strong>row (por defecto)</strong></h3>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-direction: row;
}</code></pre>



<figure class="wp-block-image size-full"><img decoding="async" width="886" height="542" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-02.webp" alt="" class="wp-image-13673" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-02.webp 886w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-02-300x184.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-02-768x470.webp 768w" sizes="(max-width: 886px) 100vw, 886px" /></figure>



<h3 class="wp-block-heading">2.2 row-reverse</h3>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-direction: row-reverse;
}</code></pre>



<figure class="wp-block-image size-full"><img decoding="async" width="964" height="546" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-04.webp" alt="" class="wp-image-13677" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-04.webp 964w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-04-300x170.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-04-768x435.webp 768w" sizes="(max-width: 964px) 100vw, 964px" /></figure>



<h3 class="wp-block-heading">2.3 column</h3>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-direction: column;
}</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="886" height="665" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-03.webp" alt="" class="wp-image-13675" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-03.webp 886w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-03-300x225.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-03-768x576.webp 768w" sizes="auto, (max-width: 886px) 100vw, 886px" /></figure>



<h3 class="wp-block-heading">2.4 column-reverse</h3>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-direction: column-reverse;
}</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="964" height="664" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-05.webp" alt="" class="wp-image-13678" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-05.webp 964w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-05-300x207.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-05-768x529.webp 768w" sizes="auto, (max-width: 964px) 100vw, 964px" /></figure>



<h2 class="wp-block-heading">3. Filas (flex-wrap)</h2>



<pre class="wp-block-code"><code>&lt;div class="contenedor"&gt;
    &lt;div class="elemento"&gt;a&lt;/div&gt;
    &lt;div class="elemento"&gt;b&lt;/div&gt;
    &lt;div class="elemento"&gt;c&lt;/div&gt;
    &lt;div class="elemento"&gt;d&lt;/div&gt;
    &lt;div class="elemento"&gt;e&lt;/div&gt;
    &lt;div class="elemento"&gt;f&lt;/div&gt;
    &lt;div class="elemento"&gt;g&lt;/div&gt;
    &lt;div class="elemento"&gt;h&lt;/div&gt;
    &lt;div class="elemento"&gt;i&lt;/div&gt;
    &lt;div class="elemento"&gt;j&lt;/div&gt;
&lt;/div&gt;</code></pre>



<h3 class="wp-block-heading">3.1 frex-wrap: nowrap (por defecto)</h3>



<p class="wp-block-paragraph">Los elemenos adaptan su tamaño para caber en la fila.</p>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="964" height="513" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-06.webp" alt="" class="wp-image-13682" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-06.webp 964w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-06-300x160.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-06-768x409.webp 768w" sizes="auto, (max-width: 964px) 100vw, 964px" /></figure>



<h3 class="wp-block-heading">3.2 flex-wrap: wrap</h3>



<p class="wp-block-paragraph">Los elementos respetan su ancho (300px) y ocupan otra fila cuando no caben.</p>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="333" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-07-1024x333.webp" alt="" class="wp-image-13683" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-07-1024x333.webp 1024w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-07-300x98.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-07-768x250.webp 768w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-07-1536x499.webp 1536w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-07.webp 1578w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">3.3 flex-wrap: wrap-reverse</h3>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap-reverse;
}</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="333" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-08-1024x333.webp" alt="" class="wp-image-13686" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-08-1024x333.webp 1024w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-08-300x98.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-08-768x250.webp 768w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-08-1536x499.webp 1536w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-08.webp 1578w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">3.4 flex-flow</h3>



<p class="wp-block-paragraph">Agrupa flex-direction y flex-flow en una única propiedad.</p>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-flow: row wrap;
}</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="333" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-07-1024x333.webp" alt="" class="wp-image-13683" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-07-1024x333.webp 1024w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-07-300x98.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-07-768x250.webp 768w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-07-1536x499.webp 1536w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-07.webp 1578w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-flow: row wrap-reverse;
}</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="333" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-08-1024x333.webp" alt="" class="wp-image-13686" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-08-1024x333.webp 1024w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-08-300x98.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-08-768x250.webp 768w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-08-1536x499.webp 1536w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-08.webp 1578w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-flow: column wrap;
}</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="915" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-09-1024x915.webp" alt="" class="wp-image-13690" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-09-1024x915.webp 1024w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-09-300x268.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-09-768x687.webp 768w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-09.webp 1169w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-flow: column wrap-reverse;
}</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="915" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-10-1024x915.webp" alt="" class="wp-image-13691" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-10-1024x915.webp 1024w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-10-300x268.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-10-768x687.webp 768w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-10.webp 1169w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">4. Alineación</h2>



<h3 class="wp-block-heading">4.1 justify-content</h3>



<h4 class="wp-block-heading">4.1.1 justify-content: start</h4>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-flow: row wrap;
    background-color:#666666;
    height: 500px;
    justify-content: start;
}</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="636" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-13-1024x636.webp" alt="" class="wp-image-13733" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-13-1024x636.webp 1024w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-13-300x186.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-13-768x477.webp 768w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-13.webp 1165w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h4 class="wp-block-heading">4.1.2 justify-content: center</h4>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-flow: row wrap;
    background-color:#666666;
    height: 500px;
    justify-content: center;
}</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="636" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-11-1024x636.webp" alt="" class="wp-image-13729" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-11-1024x636.webp 1024w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-11-300x186.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-11-768x477.webp 768w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-11.webp 1165w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h4 class="wp-block-heading">4.1.3 justify-content: end</h4>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-flow: row wrap;
    background-color:#666666;
    height: 500px;
    justify-content: end;
}</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="636" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-12-1024x636.webp" alt="" class="wp-image-13731" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-12-1024x636.webp 1024w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-12-300x186.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-12-768x477.webp 768w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-12.webp 1165w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h4 class="wp-block-heading">4.1.4 justify-content: space-around</h4>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-flow: row wrap;
    background-color:#666666;
    height: 500px;
    justify-content: space-around;
}</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="636" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-14-1024x636.webp" alt="" class="wp-image-13736" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-14-1024x636.webp 1024w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-14-300x186.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-14-768x477.webp 768w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-14.webp 1165w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h4 class="wp-block-heading">4.1.5 justify-content: space-between</h4>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-flow: row wrap;
    background-color:#666666;
    height: 500px;
    justify-content: space-between;
}</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="636" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-15-1024x636.webp" alt="" class="wp-image-13738" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-15-1024x636.webp 1024w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-15-300x186.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-15-768x477.webp 768w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-15.webp 1165w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h4 class="wp-block-heading">4.1.6 justify-content: space-evenly</h4>



<pre class="wp-block-code"><code>.contenedor{
    display: flex;
    flex-flow: row wrap;
    background-color:#666666;
    height: 500px;
    justify-content: space-evenly;
}</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="636" src="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-17-1024x636.webp" alt="" class="wp-image-13740" srcset="https://danisanchez.net/wp-content/uploads/2023/01/flexbox-17-1024x636.webp 1024w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-17-300x186.webp 300w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-17-768x477.webp 768w, https://danisanchez.net/wp-content/uploads/2023/01/flexbox-17.webp 1165w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">Continuará&#8230;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://danisanchez.net/guia-rapida-de-flexbox/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
