<?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: noahsastoque21346</title>
    <description>The latest articles on DEV Community by noahsastoque21346 (@noahsastoque21346).</description>
    <link>https://dev.to/noahsastoque21346</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%2F494296%2Fe5ba7b8b-9c3c-410a-b615-ff45c262f34b.png</url>
      <title>DEV Community: noahsastoque21346</title>
      <link>https://dev.to/noahsastoque21346</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/noahsastoque21346"/>
    <language>en</language>
    <item>
      <title>CSS Grid Blog Post</title>
      <dc:creator>noahsastoque21346</dc:creator>
      <pubDate>Mon, 19 Oct 2020 15:37:15 +0000</pubDate>
      <link>https://dev.to/noahsastoque21346/css-grid-blog-post-13i7</link>
      <guid>https://dev.to/noahsastoque21346/css-grid-blog-post-13i7</guid>
      <description>&lt;h2&gt;
  
  
  CSS Grid Basics
&lt;/h2&gt;

&lt;p&gt;The CSS Grid Layout is a 2-D grid-based layout system that is mainly used to layout web pages. CSS Grid is very popular for web page design since it uses rows and columns and does not require having to use floats and positioning. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MfuuG_2r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://s3-torquehhvm-wpengine.netdna-ssl.com/uploads/2018/06/full-stack-festival.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MfuuG_2r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://s3-torquehhvm-wpengine.netdna-ssl.com/uploads/2018/06/full-stack-festival.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Definitions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Grid Elements- A grid system contains a parent element as well as child elements. 
Ex: &lt;code&gt;&amp;lt;div class="grid-container"&amp;gt;
&amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Display Property- A specific HTML element will become a grid container when its "display" property is set to grid in CSS. Additionally, all children of the grind container become grid items.
Ex: &lt;code&gt;.grid-container {display: grid;}&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Grid Columns/Rows/Gaps- The grid column is the vertical line of the grid, the row is the horizontal line, and the gap is the space between each column and row.
Ex: &lt;code&gt;grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 200px;
grid-gap: 50px;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Grid Container- Grid containers "contain" grid items, which are found inside columns and rows.
Ex: &lt;code&gt;.grid container {display: grid;}&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The Grid-Template Columns Property- This property defines the number of columns in a given grid layout, and it can define the width of each column.
Ex: &lt;code&gt;.grid-container {
display: grid;
grid-template-columns: 80px 200px auto 40px;
}&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The Grid-Template Rows Property- Similar to the columns property, the rows property defines the number of rows in each layout, and it can define the height of each row. Ex: &lt;code&gt;.grid-container {
display: grid;
grid-template-rows: 80px 200px;
}&lt;/code&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q_z_Byn---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.w3schools.com/css/grid_lines.png" alt="alt text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below is a sample grid container I used which includes columns, rows, gaps, padding, and height.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#childCostumeGrid&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-rows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;300px&lt;/span&gt; &lt;span class="m"&gt;300px&lt;/span&gt; &lt;span class="m"&gt;300px&lt;/span&gt; &lt;span class="m"&gt;300px&lt;/span&gt; &lt;span class="m"&gt;300px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-row-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-column-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;40px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt; &lt;span class="m"&gt;80px&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt; &lt;span class="m"&gt;80px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Figma Example
&lt;/h2&gt;

&lt;p&gt;This image below is the sketch of the website that my partner and I are going to work on. It is essential that you map out your plan of action before you execute it, it really helps!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hnfHZmXG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/okee1l6t9y76ewe8pv90.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hnfHZmXG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/okee1l6t9y76ewe8pv90.PNG" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  CSS Grid Sample Website
&lt;/h2&gt;

&lt;p&gt;In this sample website, my partner and I utilized CSS Grid to create a website for costume shopping. &lt;/p&gt;

&lt;p&gt;First, we inputted a navbar to give our website a heading where users can click on "Adult", "Teen", or "Child" to view the costumes within each category.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ia870C5s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/520zso3artbtr2qce17v.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ia870C5s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/520zso3artbtr2qce17v.PNG" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, we used CSS Grid on our homepage to separate the categories of each costume type into Adult, Teen, and Child into a grid container. &lt;br&gt;
Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#buttonGrid&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-rows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;345px&lt;/span&gt; &lt;span class="m"&gt;345px&lt;/span&gt; &lt;span class="m"&gt;345px&lt;/span&gt; &lt;span class="m"&gt;345px&lt;/span&gt; &lt;span class="m"&gt;345px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-row-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-column-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;40px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt; &lt;span class="m"&gt;80px&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt; &lt;span class="m"&gt;80px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Outcome: &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ijlie_Bs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8v20g65run17igmcairy.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ijlie_Bs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8v20g65run17igmcairy.PNG" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, in each adult, teen, and child section of the website, we used CSS Grid to space out the costume options within each category. Furthermore, within each grid container we used a &lt;code&gt;#am&lt;/code&gt; ID to import an image of a costume. This way, the layout of the page looks like a selection of costume choices with 3 rows and 3 columns of costume choices per category simply by using CSS Grid!&lt;br&gt;
Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#adultCostumeGrid&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-rows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;345px&lt;/span&gt; &lt;span class="m"&gt;345px&lt;/span&gt; &lt;span class="m"&gt;345px&lt;/span&gt; &lt;span class="m"&gt;345px&lt;/span&gt; &lt;span class="m"&gt;345px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-row-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-column-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;40px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt; &lt;span class="m"&gt;80px&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt; &lt;span class="m"&gt;80px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; 
&lt;span class="nf"&gt;#am1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url('Images/am1.jpg')&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cover&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;#am2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url('Images/am2.jpg')&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cover&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;#am3&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url('Images/am3.jpg')&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cover&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Outcome:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EP6jfCgM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2llli2wqrpaom2b03l9m.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EP6jfCgM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2llli2wqrpaom2b03l9m.PNG" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Overall, CSS Grid allowed us to align and separate images and containers with ease, and makes a rather complex website making process into a simple one. With a little practice, you can make your own website while utilizing CSS Grid to make it pop while making it look organized!&lt;/p&gt;

&lt;p&gt;Sources:&lt;br&gt;
&lt;a href="https://costume-emporium.cadenserrato.repl.co/adult.html"&gt;https://costume-emporium.cadenserrato.repl.co/adult.html&lt;/a&gt;&lt;br&gt;
&lt;a href="https://css-tricks.com/snippets/css/complete-guide-grid/"&gt;https://css-tricks.com/snippets/css/complete-guide-grid/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.w3schools.com/css/css_grid.asp"&gt;https://www.w3schools.com/css/css_grid.asp&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
