<?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: raboomar</title>
    <description>The latest articles on DEV Community by raboomar (@raboomar).</description>
    <link>https://dev.to/raboomar</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%2F932350%2F53139b6b-383a-41dd-b2c5-50ed404f6e21.png</url>
      <title>DEV Community: raboomar</title>
      <link>https://dev.to/raboomar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raboomar"/>
    <language>en</language>
    <item>
      <title>React CSS Grid</title>
      <dc:creator>raboomar</dc:creator>
      <pubDate>Sun, 25 Sep 2022 22:43:25 +0000</pubDate>
      <link>https://dev.to/raboomar/react-css-grid-47mb</link>
      <guid>https://dev.to/raboomar/react-css-grid-47mb</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Creating our app
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app my-react-grid  
cd my-react-grid
code .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Cleaning up our app:
Delete everything in our App.js 
add four divs:
1) Container
2)header 
3)main body
4)footer 
it should look like this once you're done.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import "./App.css";

function App() {
  return (
    &amp;lt;div className="grid-container"&amp;gt;
      &amp;lt;div className="header-container"&amp;gt;Header&amp;lt;/div&amp;gt;
      &amp;lt;div className="body-container"&amp;gt;body&amp;lt;/div&amp;gt;
      &amp;lt;div className="footer-container"&amp;gt;Footer&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App;

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

&lt;/div&gt;



&lt;p&gt;Next is cleaning up our app.css:&lt;br&gt;
Delete everything and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.grid-container {
  display: grid;
  grid-template-areas:
    "header header header header header header"
    "body body body body body body"
    "footer footer footer footer footer footer";
  gap: 10px;
  padding: 10px;
}

.header-container {
  grid-area: header;
}
.body-container {
  grid-area: body;
  height: 100vh;
}
.footer-container {
  grid-area: footer;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The grid template area is where we establish the cells in the grid and assign them names.&lt;br&gt;
grid-area property specifies a grid item's size and location in a grid layout. &lt;br&gt;
Giving the body a height of 100vh allows it to take the maximum height, pushing the header to the top and the footer to the bottom. &lt;/p&gt;

</description>
      <category>css</category>
      <category>grid</category>
      <category>react</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
