<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jason Alan Torres on Medium]]></title>
        <description><![CDATA[Stories by Jason Alan Torres on Medium]]></description>
        <link>https://medium.com/@jasonalantorres?source=rss-7090d5a3ef3f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*99CafhXGw6olOhcT</url>
            <title>Stories by Jason Alan Torres on Medium</title>
            <link>https://medium.com/@jasonalantorres?source=rss-7090d5a3ef3f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 02:28:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jasonalantorres/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[To position: Absolute or to position: Relative? That is the question.]]></title>
            <link>https://medium.com/@jasonalantorres/to-position-absolute-or-to-position-relative-that-is-the-question-f290b52e2676?source=rss-7090d5a3ef3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f290b52e2676</guid>
            <dc:creator><![CDATA[Jason Alan Torres]]></dc:creator>
            <pubDate>Mon, 08 Jan 2024 16:33:25 GMT</pubDate>
            <atom:updated>2024-01-08T16:33:25.622Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the very first things you tackle when you begin adding CSS to you HTML is inputing some type of visual structure. Structure is everything. Without a legible and appealing structure, your website will be easily glossed over and have the appearance of random Lego colors and shapes stacked on top of each other. I must admit in the beginning and still do somewhat struggle with positioning elements, especially understanding relative and absolute positioning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*Jhnzvd49wngI0fv86EsGtg.jpeg" /></figure><h3>Whats your position?</h3><p>The position property has six values; <strong>static</strong>, <strong>relative</strong>, <strong>absolute</strong>, <strong>fixed</strong>, <strong>sticky</strong> and <strong>inherit</strong>. Static is the default position for every element. When it comes to static what you see is what you get, no frills. Fixed and Sticky are pretty much as the name implies. <strong>Fixed</strong> while be in a set position, always. <strong>Sticky</strong> on the other hand will be at a set degree or location on the webpage but will not be lost once scrolling through. The <strong>inherit</strong> value can be used to force an element to inherit the positioning value of its parent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*LpX76ckmpN22TeOor6nxVw.jpeg" /></figure><h3>Position: relative ;</h3><p>When using the position relative, an element remains in the original flow of the document, just like the default static value, only now the left/right/top/bottom and z-index properties are now unlocked. This way you can specify the location of the element without interfering with the natural flow. The positional properties will specify the -vertical or horizontal- offset from its normal position. The element is relative to itself. The position of other elements will not be affected by the relative element.</p><p>The photo below provides visual contexts for <strong>position: relative ;</strong>. Moving the red cube below was done by setting the <strong>left</strong> property to <strong>2em</strong> and the <strong>top</strong> property to <strong>3em</strong>. This results in the red cube moving 2em to the left, from its original position.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ILKLLDTTpgr6vbHaXK6M-A.jpeg" /><figcaption>Example of position relative</figcaption></figure><h3>Position: absolute ;</h3><p>When using position absolute an element is removed from the flow of the document. Other elements are not affected by this element and they will behave as if it’s not even there. The positional properties left/right/top etc. will work on absolute elements. By default the top and left values will be set to that of the parent. Because the element does not follow the flow of the page, one must set these values.</p><p>The photo below provides visual contexts for <strong>position: absolute ;</strong>. Moving the green cube was done by setting the <strong>left</strong> property to <strong>11em</strong> and the <strong>top</strong> property to <strong>6em</strong>. As you can see thats way more than the previous red cube, which was set to 2em and 3em.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GEfcUGVGklIdynU6GqsQLA.jpeg" /><figcaption>Example of position absolute</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f290b52e2676" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flexbox vs Grid: Which should you use?]]></title>
            <link>https://medium.com/@jasonalantorres/flexbox-vs-grid-which-should-you-use-2ddd6322b12d?source=rss-7090d5a3ef3f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ddd6322b12d</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[css-grid]]></category>
            <category><![CDATA[flexbox]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[Jason Alan Torres]]></dc:creator>
            <pubDate>Tue, 24 Oct 2023 15:58:58 GMT</pubDate>
            <atom:updated>2023-10-24T16:03:21.203Z</atom:updated>
            <content:encoded><![CDATA[<p>Not sure on which type of layout you should use on your next project? This is a question every new programer has. Well, lets take a look at certain aspects that may make one superior to the other given a particular scenario.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*DqkrIaN--8GpJUCAe2oMdQ.png" /></figure><h3>Flexbox — One Dimensional</h3><p>Flexbox is used for <strong>One Dimensional</strong> layouts. That means content that goes ONE direction — <em>horizontal</em> or <em>vertical</em>.</p><p>An example of best use for flexbox is when creating a Navbar . You may have a logo and page links laid out <em>horizontally</em> in a row (One directional). Using Flexbox will give you more flexibility and control of the content with <em>less</em> lines of code.</p><pre>&lt;nav&gt;<br>  &lt;div&gt;Home&lt;/div&gt;<br>  &lt;div&gt;About&lt;/div&gt;<br>  &lt;div&gt;Contact&lt;/div&gt;<br>  &lt;div&gt;Sign In&lt;/div&gt;<br>&lt;/nav&gt;</pre><pre>nav {<br>  display: flex;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*_pq1CDofvye1fPzr.png" /></figure><h3>Grid Layouts — Two Dimensional</h3><p>Grid layouts are used for <strong>Two Dimensional Layouts</strong>. This essentially means that if you’re going to create a layout with both <em>Rows</em> and <em>Columns</em>, use the Grid system.</p><p>The Grid system is a perfect solution for neatly organizing page containers<em>.</em></p><pre>&lt;div class=&quot;cards__container&quot;&gt;<br>    &lt;div class=&quot;cards__image&quot;&gt;<br>      &lt;img src=&quot;/Assets/image.jpeg&quot; alt=&quot;cool_image&quot;&gt;<br>    &lt;/div&gt;<br>    &lt;div class=&quot;cards__text&quot;&gt;<br>      &lt;h3&gt;Cool Header&lt;/h3&gt;<br>      &lt;p&gt;Some cool text..&lt;/p&gt;   <br> &lt;/div&gt;</pre><pre>.cards__container {<br>    display: grid;<br>    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));<br>    grid-gap: 10px;<br>    padding-bottom: 50px;<br>}</pre><h3>YES, You Can Combine the Two!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/0*hKxde-zLi3BAz8CH.png" /></figure><p>Although a website can be created using solely Flexbox or the Grid system, one can argue that it might be best to utilize their strengths simultaneously. In the below example I will show how this can be done.</p><p>Here’s the HTML.</p><pre> &lt;footer&gt;<br>   &lt;div class=&quot;social_links&quot;&gt;<br>     &lt;div class=&quot;social_icons&quot;&gt;<br>       &lt;img src=&quot;/Assets/logo1.svg&quot; alt=&quot;facebook&quot;&gt;<br>       &lt;p&gt;FACEBOOK&lt;/p&gt;<br>     &lt;/div&gt;<br>     &lt;div class=&quot;social_icons&quot;&gt;<br>       &lt;img src=&quot;/Assets/logo2.svg&quot; alt=&quot;twitter&quot;&gt;<br>       &lt;p&gt;TWITTER&lt;/p&gt;<br>     &lt;/div&gt;<br>     &lt;div class=&quot;social_icons&quot;&gt;<br>       &lt;img src=&quot;/Assets/logo3.svg&quot; alt=&quot;instagram&quot;&gt;<br>       &lt;p&gt;INSTAGRAM&lt;/p&gt;<br>     &lt;/div&gt;<br>        &lt;div class=&quot;social_icons&quot;&gt;<br>        &lt;img src=&quot;/Assets/logo4.svg&quot; alt=&quot;linkedin&quot;&gt;<br>        &lt;p&gt;LINKEDIN&lt;/p&gt;<br>     &lt;/div&gt;<br>   &lt;/div&gt;<br>   &lt;div class=&quot;address&quot;&gt;<br>     &lt;div class=&quot;address_two&quot;&gt;<br>        &lt;h3&gt;Company Address&lt;/h3&gt;<br>        &lt;p&gt;Responsive Street 7&lt;/p&gt;<br>        &lt;p&gt;London - United Kingdom&lt;/p&gt;<br>        &lt;p&gt;Europe&lt;/p&gt;<br>    &lt;/div&gt;<br>       &lt;div class=&quot;address_two&quot;&gt;<br>        &lt;h3&gt;E-mail&lt;/h3&gt;<br>        &lt;p&gt;contact@yourdomain.com&lt;/p&gt;<br>        &lt;p&gt;Office@yourdomain.com&lt;/p&gt;<br>       &lt;/div&gt;<br>     &lt;div class=&quot;address_two&quot;&gt;<br>       &lt;h3&gt;Phone Numbers&lt;/h3&gt;<br>       &lt;p&gt;0800 4521 800 50&lt;/p&gt;<br>       &lt;p&gt;0800 4521 800 16&lt;/p&gt;<br>       &lt;p&gt;0800 4521 800 15&lt;/p&gt;<br>      &lt;/div&gt;<br>     &lt;/div&gt;<br>      &lt;div class=&quot;copyright&quot;&gt;<br>       &lt;hr&gt;<br>       &lt;p&gt;Copyright 2045 - Your Domain Name&lt;/p&gt;<br>       &lt;p&gt;Design and coding by Jason Torres&lt;/p&gt;<br>      &lt;/div&gt;<br>&lt;/footer&gt;</pre><p>Here you will see the combination of Flexbox within the Grid system to help create a responsive website.</p><pre>footer{<br>    background-color: #282828;<br>    color: #777;<br>    display: grid;<br>    grid-template-rows: repeat(3, 175px);<br>}<br><br>.social_links {<br>    display: flex;<br>    justify-content: center;<br>    text-align: center;<br>    align-items: center;<br>    height: 100px;<br>}<br><br>.social_links &gt; p {<br>    margin: 10px;<br>    padding: 5px;<br>}<br><br>.social_icons {display: flex;}<br><br>.address {<br>    display: grid;<br>    grid-template-columns: repeat(3, 1fr);<br>    align-items: center;<br>    text-align: center;<br>    align-self: center;<br>    grid-row: 2;<br>}<br><br>.address_two &gt; p{<br>    padding: 2px;<br>}<br><br>.copyright &gt; hr {<br>    margin-bottom: 25px;<br>}<br><br>.copyright {<br>    display: flex;<br>    flex-direction: column;<br>    justify-content: center;<br>    align-items: center;<br>    text-align: center;<br>    align-self: center;<br>    grid-row: 3;<br>}</pre><p>And now we have a layout that uses the strengths of both Flexbox and the Grid system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o1euRYX70IJw6MizV2qFRw.png" /></figure><p>To answer the initial question as to which is superior? It realy depends on what you re attempting to accomplish. Both work well alone but when applied together, they become a superpower at accomplishing a s successful responsive website. The possibilities are virtually endless.</p><p>Thanks you for your time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ddd6322b12d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>