{"id":139760,"date":"2018-12-03T11:42:21","date_gmt":"2018-12-03T11:42:21","guid":{"rendered":"https:\/\/getflywheel.com\/?p=26877"},"modified":"2025-11-25T09:45:07","modified_gmt":"2025-11-25T15:45:07","slug":"card-layout-css-grid-layout-how-to","status":"publish","type":"resource","link":"https:\/\/wpengine.com\/case-studies\/resources\/card-layout-css-grid-layout-how-to\/","title":{"rendered":"How to Create a Card Layout Using CSS Grid Layout"},"content":{"rendered":"\n<p><em>Editor&#8217;s note: This guest post was written by <a data-type=\"URL\" data-id=\"https:\/\/abbeyjfitzgerald.com\/\" href=\"https:\/\/abbeyjfitzgerald.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Abbey Fitzgerald<\/a>, a UX software engineer and web designer who loves the art of crafting code.<\/em><\/p>\n\n\n\n<p>CSS Grid Layouts are changing the way web designers work, allowing for a more efficient way of laying out website content. <\/p>\n\n\n\n<p>It&#8217;s been long awaited, but finally this approach has really taken off, and in many cases, it is in production. It hss revolutionized the way websites are designed and, once designers get the hang of it, it will <a data-type=\"URL\" data-id=\"https:\/\/wpengine.com\/resources\/customize-theme-css\/\" href=\"https:\/\/wpengine.com\/resources\/customize-theme-css\/\" target=\"_blank\" rel=\"noreferrer noopener\">give more flexibility<\/a> to web layouts.<\/p>\n\n\n\n<p>If you\u2019ve tried designing with <a href=\"https:\/\/torquemag.io\/2018\/08\/css-grids\/\" data-type=\"URL\" data-id=\"https:\/\/torquemag.io\/2018\/08\/css-grids\/\" target=\"_blank\" rel=\"noreferrer noopener\">CSS Grid<\/a> and have checked out <a href=\"https:\/\/torquemag.io\/2020\/04\/css-grid-tutorial\/\" target=\"_blank\" rel=\"noreferrer noopener\">tutorials on the web<\/a>, you may have found information that pertains to an overall layout approach. Things like: header, content, footer, etc. <\/p>\n\n\n\n<p>However, CSS Grid can also be useful for other website details, such as cards. <a href=\"https:\/\/www.quackit.com\/css\/grid\/examples\/css_grid_card_examples.cfm\" target=\"_blank\" rel=\"noreferrer noopener\">Card layouts<\/a> are a common way of displaying content, and they can be efficiently created with CSS Grid. By using this method, card content areas are easily repeatable, can be viewed on many different device types, and the size is easily controlled.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">CSS Grid Layout Tools<\/h2>\n\n\n\n<p>As you\u2019re going along, you\u2019ll want to inspect things on the page. Firefox has great developer tools for seeing grid areas. Using <a href=\"https:\/\/firefox-source-docs.mozilla.org\/devtools-user\/\" data-type=\"URL\" data-id=\"https:\/\/firefox-source-docs.mozilla.org\/devtools-user\/\" target=\"_blank\" rel=\"noreferrer noopener\">Firefox developer tools<\/a>, you can see an overlay that outlines the grid. Firefox Developer Edition also has this ability.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2018\/04\/inspector-tools.png\" alt=\"card layout css grid layout how to tutorial inspector tools\" class=\"wp-image-26879\" \/><\/figure>\n\n\n\n<p>Select the Overlay Grid you want to display (depending on your design, there can be more than one). The Grid Display Settings allow you to take a closer look by displaying the line number, area names, and how you want the lines to extend. This will be helpful as you design.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Simple Cards With CSS Grid Layout<\/h2>\n\n\n\n<p>If you\u2019re new to CSS Grid, you\u2019ll want to brush up on the basics and create a simple <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/CSS_grid_layout\" target=\"_blank\" rel=\"noreferrer noopener\">CSS Grid Layout<\/a>. Cards are great a great way to display content, as well as an interesting UI element that\u2019s intuitive to use. <\/p>\n\n\n\n<p>They also provide a great format for users to quickly scan content and engage with what they\u2019re most interested in. Cards also allow designers to format content in a visually appealing way, with great imagery, intro content, links, and more!&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Cards and Overall Page Layout<\/h3>\n\n\n\n<p>As an aside, it\u2019s important to know that CSS Grid does not have to be used on an entire page layout. Grids can be used in certain areas of the page if needed. <\/p>\n\n\n\n<p>Since this is a tutorial on card layouts, a grid approach can be used exclusively here even if the rest of the page does not utilize CSS Grid. As long as the grid area is defined and <code>display: grid;<\/code> is declared on the wrapper, this approach can be used.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Working With a Set Number of Cards<\/h3>\n\n\n\n<p>In some cases, it\u2019s easy to plan for a set number of cards. With a set amount of content, the number of cards will stay the same. For example, there may be four cards that explain business offerings, with each offering on its own card.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2018\/04\/four-card-row.png\" alt=\"card layout css grid layout how to tutorial four card row\" class=\"wp-image-26881\" \/><\/figure>\n\n\n\n<p>For this example (and the others), all the <code>.card<\/code> items are inside a <code>.cards<\/code> container element. To accomplish this, it\u2019s pretty simple.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;css]\n.cards {\n\ndisplay: grid;\n\ngrid-template-columns: repeat(3, 1fr);\n\ngrid-auto-rows: auto;\n\ngrid-gap: 1rem;\n\n}\n\n&amp;amp;amp;nbsp;\n\n.card {\n\nborder: 2px solid #e7e7e7;\n\nborder-radius: 4px;\n\npadding: .5rem;\n\n}\n&#091;\/css]<\/code><\/pre>\n\n\n\n<p>It\u2019s important to display the value of <code>.cards<\/code> to grid. Without this, grid areas cannot be created. The next step is to define the <code>grid-template-columns<\/code> and choose the styling. The actual card styling will be declared with a class of <code>.card<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2018\/04\/card-classes.png\" alt=\"card layout css grid layout how to tutorial card classes\" class=\"wp-image-26882\" \/><\/figure>\n\n\n\n<p>In this example, you\u2019ll see multiple article tags with the class of <code>.card<\/code>. See it on <a href=\"https:\/\/codepen.io\/abbeyjfitzgerald\/pen\/QaeoYj\" target=\"_blank\" rel=\"noopener noreferrer\">Codepen<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Repeat for Set Number of Cards<\/h4>\n\n\n\n<p>This is where the cards start taking shape. To create a fluid amount of columns per row, repeat is used with the <code>repeat()<\/code> function. This function takes two arguments: number of times to repeat and the value to repeat.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2018\/04\/three-card-row.png\" alt=\"card layout css grid layout how to tutorial three card row\" class=\"wp-image-26883\" \/><\/figure>\n\n\n\n<p>For example, <code>grid-template-columns: repeat(3, 200px);<\/code> computes to <code>grid-template-columns: 200px 200px 200px;<\/code>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Fractional Unit<\/h4>\n\n\n\n<p>You\u2019ll see that the example code uses a \u201cfr.\u201d What is that exactly? This unit of measurement became popular with CSS Grid. Fr means \u201cfractional unit\u201d and <code>1fr<\/code> takes up 1 part of the available space. It helps simplify space calculations.<\/p>\n\n\n\n<p>Fractional units can be used alone or they allow you to specify a width of <code>1fr<\/code> and you can add child elements, too. Multiple fr will be equally shared across all child elements.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2018\/04\/one-fr-group.png\" alt=\"card layout css grid layout how to tutorial one fr group\" class=\"wp-image-26884\" \/><\/figure>\n\n\n\n<p>Different fractional units can be specified. For example, when grid columns are <code>1fr 2fr 1fr<\/code>, two fractional units take up twice the space as one fractional unit.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2018\/04\/mixed-fr-group.png\" alt=\"card layout css grid layout how to tutorial mixed fr group\" class=\"wp-image-26885\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Repeat for a Dynamic Number of Cards<\/h3>\n\n\n\n<p>In some cases, you may not know the number of cards needed, so planning for a set number won\u2019t work. The same approach will be taken as it was with repeat but there is the option to fit as many as needed with autofill.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;css]\ngrid-template-columns: repeat(auto-fill, 250px);\n&#091;\/css]<\/code><\/pre>\n\n\n\n<p>Width declarations are needed in addition to <code>auto-fill<\/code>. Keen in mind, with a px value, there may be space off to the right when there isn\u2019t enough for the card to fit, but this doesn\u2019t have to be the case, as you will see a bit later.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2018\/04\/row-of-cards-with-space.png\" alt=\"card layout css grid layout how to tutorial row of cards with space\" class=\"wp-image-26886\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Minmax for More Control Over Card Width<\/h4>\n\n\n\n<p>Minmax is the perfect solution, since a fractional unit by itself would make the cards full width. Adding both repeat and a minmax to the style declaration will get rid of the possible empty space and cards will appear more fluid.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;css]\ngrid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n&#091;\/css]<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter wp-image-26887 size-full\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2018\/04\/three-card-full-width.png\" alt=\"card layout css grid layout how to tutorial three card full width\" class=\"wp-image-26887\" \/><figcaption class=\"wp-element-caption\">This declaration will tell the browser to fit as many columns based on the sizes specified in the repeat syntax.<\/figcaption><\/figure>\n\n\n\n<p>Columns will always fit the grid and the cards will be at least 200px. When the minimum space does not perfectly fit the space, this is where the max width comes into play. When another 200px width card won\u2019t fit, the other cards will be larger than 200px, so they stretch to fill the row with more space and it\u2019ll be distributed equally.&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Mobile<\/h4>\n\n\n\n<p>Since the smallest and largest cards have been planned, this is a good time to talk about mobile. Cards work well on larger and smaller devices because content is in digestible chunks, and the cards can easily scale up and down. CSS Grid helps create a great mobile experience and in some cases, it\u2019s much easier than having a separate media query.<\/p>\n\n\n\n<p>In this example, cards need to size down to fit in mobile and size up to be a fraction of the space available, so they appear full-width on a smaller device, no separate media query needed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;css]\ngrid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n&#091;\/css]<\/code><\/pre>\n\n\n\n<p>The minimum width of the card is 300px. As many 300px cards that can fit will appear in the row. When the device is very small, there\u2019s a good chance that there isn\u2019t the available space for two cards in a row. <\/p>\n\n\n\n<p>That\u2019s when the <code>1fr<\/code> comes into play. The fractional unit is great for responsive designs. When two of the 300px cards won\u2019t fit, this is where the mobile view becomes very apparent. When <code>1fr<\/code> has been declared as the max width, a single card will take up all of the available space and they will stack on top of each other.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2018\/04\/in-article-css-grid-card-layout-01.png\" alt=\"css grid cards layout how to tutorial for a multi-device card layout\" class=\"wp-image-26888\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Grid Gap<\/h4>\n\n\n\n<p>Now that the width of the cards is established, the decision to have space between them needs to be made. <\/p>\n\n\n\n<p>This property is available on grid containers and it makes it easy to create gutters in the design. <code>Grid-column-gap<\/code> creates the space between each card. When you see <code>grid-gap<\/code>, that refers to the shorthand for <code>grid-row-gap<\/code> and <code>grid-column-gap<\/code>. <code>Grid-row-gap<\/code> is the space on the top and bottom of the card, <code>grid-column-gap<\/code> is the space to the left and right of the card.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">CSS Grid Layout Resources<\/h2>\n\n\n\n<p>When it comes to CSS Grid Layouts, there is plenty to learn and there are many possibilities. The best way to learn about CSS Grid Layout is to do some additional reading and experimenting. There are many great resources out there, but here are a few to get you started:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/gridbyexample.com\/resources\/\" target=\"_blank\" rel=\"noreferrer noopener\">Grid by Example<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/cssgrid.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">CSS Grid Layout course from Wes Bos<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/mozilladevelopers.github.io\/playground\/css-grid\/\" target=\"_blank\" rel=\"noreferrer noopener\">Mozilla Intro to CSS Grid<\/a><\/li>\n<\/ul>\n\n\n\n<p>Want additional resources for building and designing incredible sites with WordPress? Check out&nbsp;<a href=\"https:\/\/wpengine.com\/resources\/\" target=\"_blank\" rel=\"noreferrer noopener\">WP Engine\u2019s vast library<\/a> of educational, how-to content\u2014created for WordPress users of all technical skill levels!<\/p>\n\n\n\n<p>Find out more about\u00a0<a href=\"https:\/\/wpengine.com\/wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">hosting for WordPress sites with WP Engine<\/a>, or\u00a0<a href=\"\/contact\/\">speak to a representative now<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Editor&#8217;s note: This guest post was written by Abbey Fitzgerald, a UX software engineer and web designer who loves the art of crafting code. CSS Grid Layouts are changing the way web designers work, allowing for a more efficient way of laying out website content. It&#8217;s been long awaited, but finally this approach has really<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":1,"featured_media":145844,"template":"","resource-topic":[1396,901],"resource-role":[895,1397,896,897],"resource-type":[916],"class_list":["post-139760","resource","type-resource","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create a Card Layout Using CSS Grid Layout<\/title>\n<meta name=\"description\" content=\"Use this helpful guide to find out how card layouts can be efficiently created with CSS Grid. Discover a more efficient approach for your content layouts.\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a Card Layout Using CSS Grid Layout\" \/>\n<meta property=\"og:description\" content=\"Use this helpful guide to find out how card layouts can be efficiently created with CSS Grid. Discover a more efficient approach for your content layouts.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/case-studies\/resources\/card-layout-css-grid-layout-how-to\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-25T15:45:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/12\/css-coding_1200x627.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"627\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Create a Card Layout Using CSS Grid Layout\" \/>\n<meta name=\"twitter:description\" content=\"Use this helpful guide to find out how card layouts can be efficiently created with CSS Grid. Discover a more efficient approach for your content layouts.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/12\/css-coding_1200x627.png\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/card-layout-css-grid-layout-how-to\/\",\"url\":\"https:\/\/wpengine.com\/case-studies\/resources\/card-layout-css-grid-layout-how-to\/\",\"name\":\"How to Create a Card Layout Using CSS Grid Layout\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\"},\"datePublished\":\"2018-12-03T11:42:21+00:00\",\"dateModified\":\"2025-11-25T15:45:07+00:00\",\"description\":\"Use this helpful guide to find out how card layouts can be efficiently created with CSS Grid. Discover a more efficient approach for your content layouts.\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/card-layout-css-grid-layout-how-to\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/case-studies\/resources\/card-layout-css-grid-layout-how-to\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/card-layout-css-grid-layout-how-to\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/case-studies\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\/\/wpengine.com\/case-studies\/resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Create a Card Layout Using CSS Grid Layout\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\",\"url\":\"https:\/\/wpengine.com\/case-studies\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/f5301455463371a10d1fc290e9ad0085\",\"name\":\"WP Engine\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g\",\"caption\":\"WP Engine\"},\"sameAs\":[\"https:\/\/wpengine.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create a Card Layout Using CSS Grid Layout","description":"Use this helpful guide to find out how card layouts can be efficiently created with CSS Grid. Discover a more efficient approach for your content layouts.","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"How to Create a Card Layout Using CSS Grid Layout","og_description":"Use this helpful guide to find out how card layouts can be efficiently created with CSS Grid. Discover a more efficient approach for your content layouts.","og_url":"https:\/\/wpengine.com\/case-studies\/resources\/card-layout-css-grid-layout-how-to\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_modified_time":"2025-11-25T15:45:07+00:00","og_image":[{"width":1200,"height":627,"url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/12\/css-coding_1200x627.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_title":"How to Create a Card Layout Using CSS Grid Layout","twitter_description":"Use this helpful guide to find out how card layouts can be efficiently created with CSS Grid. Discover a more efficient approach for your content layouts.","twitter_image":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/12\/css-coding_1200x627.png","twitter_site":"@wpengine","twitter_misc":{"Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/case-studies\/resources\/card-layout-css-grid-layout-how-to\/","url":"https:\/\/wpengine.com\/case-studies\/resources\/card-layout-css-grid-layout-how-to\/","name":"How to Create a Card Layout Using CSS Grid Layout","isPartOf":{"@id":"https:\/\/wpengine.com\/case-studies\/#website"},"datePublished":"2018-12-03T11:42:21+00:00","dateModified":"2025-11-25T15:45:07+00:00","description":"Use this helpful guide to find out how card layouts can be efficiently created with CSS Grid. Discover a more efficient approach for your content layouts.","breadcrumb":{"@id":"https:\/\/wpengine.com\/case-studies\/resources\/card-layout-css-grid-layout-how-to\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/case-studies\/resources\/card-layout-css-grid-layout-how-to\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/case-studies\/resources\/card-layout-css-grid-layout-how-to\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/case-studies\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/wpengine.com\/case-studies\/resources\/"},{"@type":"ListItem","position":3,"name":"How to Create a Card Layout Using CSS Grid Layout"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/case-studies\/#website","url":"https:\/\/wpengine.com\/case-studies\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/f5301455463371a10d1fc290e9ad0085","name":"WP Engine","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g","caption":"WP Engine"},"sameAs":["https:\/\/wpengine.com"]}]}},"acf":[],"grid_image_url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2018\/12\/css-coding_343x245.png","media-type":{"term_id":916,"name":"Article","slug":"article"},"role":"<strong>Roles:<\/strong> Agency, Designer, Developer, Freelancer","topic":"<strong>Topics:<\/strong> Design, WordPress","_links":{"self":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource\/139760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource"}],"about":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/types\/resource"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/users\/1"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media\/145844"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media?parent=139760"}],"wp:term":[{"taxonomy":"resource-topic","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-topic?post=139760"},{"taxonomy":"resource-role","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-role?post=139760"},{"taxonomy":"resource-type","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-type?post=139760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}