<?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 RAZA RAHAL on Medium]]></title>
        <description><![CDATA[Stories by RAZA RAHAL on Medium]]></description>
        <link>https://medium.com/@rahalraika?source=rss-3963226de112------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*nCQ2fSl9EOFyMnCf.jpg</url>
            <title>Stories by RAZA RAHAL on Medium</title>
            <link>https://medium.com/@rahalraika?source=rss-3963226de112------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 22:30:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rahalraika/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[Flexbox or grid, which is better?]]></title>
            <link>https://medium.com/@rahalraika/flexbox-or-grid-which-is-better-e525be539c5b?source=rss-3963226de112------2</link>
            <guid isPermaLink="false">https://medium.com/p/e525be539c5b</guid>
            <category><![CDATA[html]]></category>
            <category><![CDATA[flex]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[microverse]]></category>
            <category><![CDATA[grid]]></category>
            <dc:creator><![CDATA[RAZA RAHAL]]></dc:creator>
            <pubDate>Tue, 30 Jun 2020 16:57:04 GMT</pubDate>
            <atom:updated>2020-07-14T21:25:08.488Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OHHR9bRpmvMBjB4_cAV7vA.jpeg" /></figure><p>As a new developer, you clearly spend hours trying to figure out “how can I get this silly element exactly where I want it to be on the page</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FlJnAXeJO8tE7E37mxq%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FlJnAXeJO8tE7E37mxq%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExMndiZ2ExMnl6OXhpOGNhd29ubXJibmw2dnkxenU0ZGRvbzB6ZDNzdCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FlJnAXeJO8tE7E37mxq%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="250" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd6130f2db3075120e4a274b367c31dd/href">https://medium.com/media/cd6130f2db3075120e4a274b367c31dd/href</a></iframe><p>When you start working with flex and grid you’ll find yourself wondering “why I was wasting so much time with floating and positioning” .eventually, you will get confused about which of Flex or grid is better to use.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FSSQsUSbsju3CXoX4DY%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FSSQsUSbsju3CXoX4DY%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FSSQsUSbsju3CXoX4DY%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="182" frameborder="0" scrolling="no"><a href="https://medium.com/media/09a98717532cbeb7a5da20ac6e129a1f/href">https://medium.com/media/09a98717532cbeb7a5da20ac6e129a1f/href</a></iframe><p><strong><em>Let’s start by getting to know them:</em></strong></p><h3><strong>1-</strong> <strong>Flexbox:</strong></h3><p>Flexbox is a one-dimensional layout model, it can be used to put items along with each other, horizontally or vertically. It all depends if we want a row or a column layout.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*pymIIiBfnp0dZuWerYRGQg.png" /><figcaption><a href="https://www.youtube.com/watch?v=JJSoEo8JSnc"><strong>Diagram for Flexbox models</strong></a></figcaption></figure><p>Here is an example:</p><p>Below are three boxes that we will use flex on them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-C65LYKO0Gr8SwjF4Awtlg.png" /></figure><p>This is how we simply do it:</p><p>· The box will be within a wrapper section which contains display: flex, flex-wrap: wrap, and align-items: center This will ensure that the boxes are in the center. Each block will also have space between the other box.</p><p>· Every single box will have display: flex, flex-direction: column, position: relative and align-items: center. This will ensure that the title and the paragraph are well centered.</p><p>· Each image will have display: flex, justify-content: Centre and align-items: center</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Frazara%2Fembed%2Fpreview%2FjOWGpRd%3Fheight%3D600%26slug-hash%3DjOWGpRd%26default-tabs%3Dcss%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Frazara%2Fpen%2FjOWGpRd&amp;image=https%3A%2F%2Fassets.codepen.io%2F4720821%2Finternal%2Fscreenshots%2Fpens%2FjOWGpRd.default.png%3Fformat%3Dauto%26amp%3Bha%3Dfalse%26amp%3Bheight%3D400%26amp%3Bquality%3D75%26amp%3Bv%3D1%26amp%3Bversion%3D1593464038%26amp%3Bwidth%3D700&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/2210821d56008fe62d9df401cc14042f/href">https://medium.com/media/2210821d56008fe62d9df401cc14042f/href</a></iframe><p>Flexbox has huge browser support that its so easy to use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8HbQCx4sf6QIqpL3djwc_w.png" /></figure><h3><strong>2-Grid:</strong></h3><p>Grid is a two-dimensional layout model, it can be used in both columns and rows which makes it easier to design web pages without having to use floats and positioning.</p><p>Here is a simple example of how to use the Grid:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5LVIGcUAupOkFV61OwmcWg.png" /></figure><p>Here we can use a display: grid, grid-gap column and row to put space between the boxes.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Frazara%2Fembed%2Fpreview%2FmdVBzjJ%3Fheight%3D600%26slug-hash%3DmdVBzjJ%26default-tabs%3Dhtml%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Frazara%2Fpen%2FmdVBzjJ%3Feditors%3D1100&amp;image=https%3A%2F%2Fassets.codepen.io%2F4720821%2Finternal%2Fscreenshots%2Fpens%2FmdVBzjJ.default.png%3Fformat%3Dauto%26amp%3Bha%3Dfalse%26amp%3Bheight%3D400%26amp%3Bquality%3D75%26amp%3Bv%3D1%26amp%3Bversion%3D1593473613%26amp%3Bwidth%3D700&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/bf942c46b3636a8155f85ceccdeea9df/href">https://medium.com/media/bf942c46b3636a8155f85ceccdeea9df/href</a></iframe><p>Even though the grid has decent browser support, you need to be careful when using it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V37qZMs9pem043lfNpSTXA.png" /></figure><p><strong>Flexbox or grid, which is better?</strong></p><p>As a new developer, you do not need to know which is better as much as you need to know how and when to perfectly use them in order to have clean code and a fabulous web page.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e525be539c5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>