<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arg85</title>
    <description>The latest articles on DEV Community by Arg85 (@arg85).</description>
    <link>https://dev.to/arg85</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F503147%2F6aa1ef15-1a52-453c-b4df-f0c08188e1e4.jpeg</url>
      <title>DEV Community: Arg85</title>
      <link>https://dev.to/arg85</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arg85"/>
    <language>en</language>
    <item>
      <title>Grid as I know it</title>
      <dc:creator>Arg85</dc:creator>
      <pubDate>Tue, 17 Aug 2021 17:25:51 +0000</pubDate>
      <link>https://dev.to/arg85/grid-as-i-know-it-3719</link>
      <guid>https://dev.to/arg85/grid-as-i-know-it-3719</guid>
      <description>&lt;p&gt;Grid unlike flex-box is something difficult to wrap around your mind with.It can cause a lot of problems if you don't understand it as i have experienced.&lt;br&gt;
Grid is very helpful when it comes to making a layout for websites and it becomes even more powerful when you combine it with flex-box.They are like the jay and veeru of css world one is incomplete without the other.You can make do with just one of them but why make do when you can use both.&lt;br&gt;
grid has numerous properties to use but I am just going to give you a brief of the basics because it might get overwhelming and the more you practice more you gonna understand how things work with grid.&lt;br&gt;
Just like flex-box we need to give a property of display:grid to a container with some elements inside it.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eTvr8l2g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/efwz2ebo1hc9t1vf6lds.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eTvr8l2g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/efwz2ebo1hc9t1vf6lds.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
as you can see from above picture as soon as we apply the display grid the elements try to take the whole length of the container div  and they are still in a column unlike flex-box.&lt;br&gt;
In flex-box for us to center elements vertically and horizontally you gotta write justify-content center and align-items center but in grid it is just one line of code you write place -items center and voila.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r9OZ7Bem--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/24yxc722s6z3qw7xv78w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r9OZ7Bem--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/24yxc722s6z3qw7xv78w.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
But the real power of grid comes from its grid-template-areas and grid-template-columns that allows you to make any layout for website a hell lot easier than ever.&lt;br&gt;
With grid template areas you give names to containers so that you can reference then and then simply with grid template areas on the container with display grid you can make the layout for example&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.div1{&lt;br&gt;
area:nav&lt;br&gt;
}&lt;br&gt;
.div2{&lt;br&gt;
area:main&lt;br&gt;
}&lt;br&gt;
container{&lt;br&gt;
display:grid;&lt;br&gt;
grid-template-columns:1fr 1fr 1fr;&lt;br&gt;
grid-template-area:"nav nav nav" &lt;br&gt;
                   "main main main"&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
With this type&lt;br&gt;
 of code it becomes easier to make the website responsive as you just have to switch the grid-template-columns and area for a single column layout and its responsive.&lt;br&gt;
example:&lt;br&gt;
&lt;code&gt;container{&lt;br&gt;
display:grid;&lt;br&gt;
grid-template-columns:1fr;&lt;br&gt;
grid-template-area:"nav " &lt;br&gt;
                   "main"&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
Thanks for reading!!&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Flex-box as I understand it</title>
      <dc:creator>Arg85</dc:creator>
      <pubDate>Tue, 17 Aug 2021 17:02:41 +0000</pubDate>
      <link>https://dev.to/arg85/flex-box-as-i-understand-it-48aj</link>
      <guid>https://dev.to/arg85/flex-box-as-i-understand-it-48aj</guid>
      <description>&lt;p&gt;Flex-box is like any other concept ,it is not something you can learn/understand just by reading .Unless you write the code yourself and experiment with it you can never understand it.It costed me some time because I was just watching a lot of videos and not writing the code .More you code, more you learn and more you experiment ,more you experiment more you get into errors and when you fix those errors you become what is called a developer.I will try my best to explain how I understand flex-box works.&lt;/p&gt;

&lt;p&gt;So first things firsts:&lt;br&gt;
*In order for you to apply flex-box (helps in positioning containers and its elements) you need a container that has some elements.&lt;br&gt;
*To apply flex-box in a container you access with container/div with its class or id and give it a property called display:flex;&lt;br&gt;
*As soon as you do display:flex in a container all the elements inside the container with move into a single row;&lt;br&gt;
As you can see below there is a container that has yet to be applied display flex,you will notice that the container's elements are all in a column .&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4uV2-UAa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wh54ze0i9jgvjq3hstgc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4uV2-UAa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wh54ze0i9jgvjq3hstgc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Now notice what happens if we put a display flex in the container&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NtkBLX9V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lugj474a2qrq92mwlv87.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NtkBLX9V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lugj474a2qrq92mwlv87.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Now you can notice i applied display flex on the container having the element and all of the elements inside it moved in a row which is a default behaviour of flex-box ,you can change this by applying the flex-direction:column in the container to move the elements back in one column.&lt;/p&gt;

&lt;p&gt;This helps in responsive design because some time you want the elements to be in a row and some times in column.&lt;br&gt;
you can also use the change the order by using flex-direction:row reverse and column-reverse which would change the order of the elements inside the container.Take a look below i have given each element a different color so you can notice the difference.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6g073ZYs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/czkx9x9o9xtywusux37w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6g073ZYs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/czkx9x9o9xtywusux37w.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
this is after applying flex-direcetion row-reverse,it reversed the order of elements while keeping it in a row ,same can be done with columns as well&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YaODyl3l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iqca286hyghwq0vthk32.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YaODyl3l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iqca286hyghwq0vthk32.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
If you notice the elements are centered in the above picture which is because of another property of flex-box called justify-content:center what it does is that is horizontally centers the elements and to center the elements we use align-items :center.You can learn about more option you get with them like space-evenly which are also helpful mostly in navigation bars.Below is the align items property picture.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AyxNiHnx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/202n995v3l7apgwrntt0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AyxNiHnx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/202n995v3l7apgwrntt0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Thanks for reading it so far you can get started with flex-box now.Read more about it in w3school and practice it well.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
