{"id":44505,"date":"2018-02-23T04:19:00","date_gmt":"2018-02-23T11:19:00","guid":{"rendered":"http:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/"},"modified":"2018-02-23T04:19:00","modified_gmt":"2018-02-23T11:19:00","slug":"styling-empty-cells-with-generated-content-and-css-grid-layout","status":"publish","type":"post","link":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/","title":{"rendered":"Styling Empty Cells With Generated Content And CSS Grid Layout"},"content":{"rendered":"<p>A common Grid Layout gotcha is when a newcomer to the layout method wonders how to style a grid cell which doesn\u2019t contain any content. In the current Level 1 specification, this isn\u2019t possible since there is no way to target an empty Grid Cell or Grid Area and apply styling. This means that to apply styling, you need to insert an element.<br \/>\nIn this article, I am going to take a look at how to use CSS Generated Content to achieve styling of empty cells without adding redundant empty elements and show some use cases where this technique makes sense.<\/p>\n<p class=\"wpematico_credit\"><small>Powered by <a href=\"http:\/\/www.wpematico.com\" target=\"_blank\">WPeMatico<\/a><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A common Grid Layout gotcha is when a newcomer to the layout method wonders how to style a grid cell which doesn\u2019t contain any content. In the current Level 1 specification, this isn\u2019t possible since there is no way to target an empty Grid Cell or Grid Area and apply styling. This means that to&#8230;<a class=\"moretag\" href=\"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/\"> Read the full article&#8230;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[371],"tags":[],"class_list":["post-44505","post","type-post","status-publish","format-standard","hentry","category-user-experience"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"A common Grid Layout gotcha is when a newcomer to the layout method wonders how to style a grid cell which doesn\u2019t contain any content. In the current Level 1 specification, this isn\u2019t possible since there is no way to target an empty Grid Cell or Grid Area and apply styling. This means that to\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Guest Contribution\"\/>\n\t<meta name=\"keywords\" content=\"user experience\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Design for Immersive Technologies | User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Styling Empty Cells With Generated Content And CSS Grid Layout | Design for Immersive Technologies\" \/>\n\t\t<meta property=\"og:description\" content=\"A common Grid Layout gotcha is when a newcomer to the layout method wonders how to style a grid cell which doesn\u2019t contain any content. In the current Level 1 specification, this isn\u2019t possible since there is no way to target an empty Grid Cell or Grid Area and apply styling. This means that to\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2018-02-23T11:19:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2018-02-23T11:19:00+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Styling Empty Cells With Generated Content And CSS Grid Layout | Design for Immersive Technologies\" \/>\n\t\t<meta name=\"twitter:description\" content=\"A common Grid Layout gotcha is when a newcomer to the layout method wonders how to style a grid cell which doesn\u2019t contain any content. In the current Level 1 specification, this isn\u2019t possible since there is no way to target an empty Grid Cell or Grid Area and apply styling. This means that to\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/02\\\/styling-empty-cells-with-generated-content-and-css-grid-layout\\\/#article\",\"name\":\"Styling Empty Cells With Generated Content And CSS Grid Layout | Design for Immersive Technologies\",\"headline\":\"Styling Empty Cells With Generated Content And CSS Grid Layout\",\"author\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\"},\"datePublished\":\"2018-02-23T04:19:00-07:00\",\"dateModified\":\"2018-02-23T04:19:00-07:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/02\\\/styling-empty-cells-with-generated-content-and-css-grid-layout\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/02\\\/styling-empty-cells-with-generated-content-and-css-grid-layout\\\/#webpage\"},\"articleSection\":\"User Experience\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/02\\\/styling-empty-cells-with-generated-content-and-css-grid-layout\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.taterboy.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/#listItem\",\"name\":\"User Experience\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/#listItem\",\"position\":2,\"name\":\"User Experience\",\"item\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/02\\\/styling-empty-cells-with-generated-content-and-css-grid-layout\\\/#listItem\",\"name\":\"Styling Empty Cells With Generated Content And CSS Grid Layout\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/02\\\/styling-empty-cells-with-generated-content-and-css-grid-layout\\\/#listItem\",\"position\":3,\"name\":\"Styling Empty Cells With Generated Content And CSS Grid Layout\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/user-experience\\\/#listItem\",\"name\":\"User Experience\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\",\"name\":\"Design for Immersive Technologies\",\"description\":\"User Experience for Games, Virtual Reality (VR) and Augmented\\\/Mixed Reality (AR\\\/MR)\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/\",\"name\":\"Guest Contribution\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/02\\\/styling-empty-cells-with-generated-content-and-css-grid-layout\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2aad73eb0f48c67b141e9fc978a0e498969791ed623346e361d02d19775b0bb?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Guest Contribution\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/02\\\/styling-empty-cells-with-generated-content-and-css-grid-layout\\\/#webpage\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/02\\\/styling-empty-cells-with-generated-content-and-css-grid-layout\\\/\",\"name\":\"Styling Empty Cells With Generated Content And CSS Grid Layout | Design for Immersive Technologies\",\"description\":\"A common Grid Layout gotcha is when a newcomer to the layout method wonders how to style a grid cell which doesn\\u2019t contain any content. In the current Level 1 specification, this isn\\u2019t possible since there is no way to target an empty Grid Cell or Grid Area and apply styling. This means that to\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2018\\\/02\\\/styling-empty-cells-with-generated-content-and-css-grid-layout\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"datePublished\":\"2018-02-23T04:19:00-07:00\",\"dateModified\":\"2018-02-23T04:19:00-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/\",\"name\":\"Design for Immersive Technologies\",\"description\":\"User Experience for Games, Virtual Reality (VR) and Augmented\\\/Mixed Reality (AR\\\/MR)\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Styling Empty Cells With Generated Content And CSS Grid Layout | Design for Immersive Technologies","description":"A common Grid Layout gotcha is when a newcomer to the layout method wonders how to style a grid cell which doesn\u2019t contain any content. In the current Level 1 specification, this isn\u2019t possible since there is no way to target an empty Grid Cell or Grid Area and apply styling. This means that to","canonical_url":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/","robots":"max-image-preview:large","keywords":"user experience","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/#article","name":"Styling Empty Cells With Generated Content And CSS Grid Layout | Design for Immersive Technologies","headline":"Styling Empty Cells With Generated Content And CSS Grid Layout","author":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"publisher":{"@id":"https:\/\/www.taterboy.com\/blog\/#organization"},"datePublished":"2018-02-23T04:19:00-07:00","dateModified":"2018-02-23T04:19:00-07:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/#webpage"},"isPartOf":{"@id":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/#webpage"},"articleSection":"User Experience"},{"@type":"BreadcrumbList","@id":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.taterboy.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/#listItem","name":"User Experience"}},{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/#listItem","position":2,"name":"User Experience","item":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/#listItem","name":"Styling Empty Cells With Generated Content And CSS Grid Layout"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/#listItem","position":3,"name":"Styling Empty Cells With Generated Content And CSS Grid Layout","previousItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/#listItem","name":"User Experience"}}]},{"@type":"Organization","@id":"https:\/\/www.taterboy.com\/blog\/#organization","name":"Design for Immersive Technologies","description":"User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","url":"https:\/\/www.taterboy.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author","url":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/","name":"Guest Contribution","image":{"@type":"ImageObject","@id":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d2aad73eb0f48c67b141e9fc978a0e498969791ed623346e361d02d19775b0bb?s=96&d=mm&r=g","width":96,"height":96,"caption":"Guest Contribution"}},{"@type":"WebPage","@id":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/#webpage","url":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/","name":"Styling Empty Cells With Generated Content And CSS Grid Layout | Design for Immersive Technologies","description":"A common Grid Layout gotcha is when a newcomer to the layout method wonders how to style a grid cell which doesn\u2019t contain any content. In the current Level 1 specification, this isn\u2019t possible since there is no way to target an empty Grid Cell or Grid Area and apply styling. This means that to","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.taterboy.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/#breadcrumblist"},"author":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"creator":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"datePublished":"2018-02-23T04:19:00-07:00","dateModified":"2018-02-23T04:19:00-07:00"},{"@type":"WebSite","@id":"https:\/\/www.taterboy.com\/blog\/#website","url":"https:\/\/www.taterboy.com\/blog\/","name":"Design for Immersive Technologies","description":"User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.taterboy.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Design for Immersive Technologies | User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","og:type":"article","og:title":"Styling Empty Cells With Generated Content And CSS Grid Layout | Design for Immersive Technologies","og:description":"A common Grid Layout gotcha is when a newcomer to the layout method wonders how to style a grid cell which doesn\u2019t contain any content. In the current Level 1 specification, this isn\u2019t possible since there is no way to target an empty Grid Cell or Grid Area and apply styling. This means that to","og:url":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/","article:published_time":"2018-02-23T11:19:00+00:00","article:modified_time":"2018-02-23T11:19:00+00:00","twitter:card":"summary","twitter:title":"Styling Empty Cells With Generated Content And CSS Grid Layout | Design for Immersive Technologies","twitter:description":"A common Grid Layout gotcha is when a newcomer to the layout method wonders how to style a grid cell which doesn\u2019t contain any content. In the current Level 1 specification, this isn\u2019t possible since there is no way to target an empty Grid Cell or Grid Area and apply styling. This means that to"},"aioseo_meta_data":{"post_id":"44505","title":null,"description":null,"keywords":null,"keyphrases":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_custom_image_width":null,"og_custom_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"created":"2021-02-08 05:32:22","updated":"2026-08-22 18:38:09","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"twitter_image_url":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.taterboy.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/\" title=\"User Experience\">User Experience<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tStyling Empty Cells With Generated Content And CSS Grid Layout\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.taterboy.com\/blog"},{"label":"User Experience","link":"https:\/\/www.taterboy.com\/blog\/category\/user-experience\/"},{"label":"Styling Empty Cells With Generated Content And CSS Grid Layout","link":"https:\/\/www.taterboy.com\/blog\/2018\/02\/styling-empty-cells-with-generated-content-and-css-grid-layout\/"}],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8wzr5-bzP","jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts\/44505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/comments?post=44505"}],"version-history":[{"count":0,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts\/44505\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/media?parent=44505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/categories?post=44505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/tags?post=44505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}