SlideShare a Scribd company logo
INTRODUCING
CSS GRIDJason Yingling (@jason_yingling)
WHAT IS
CSS GRID
CSS Grid is a 2 dimensional layout system that can
handle both columns and rows.
CAN I USE
CSS GRID
CSS Grid is supported in the latest version of all major
browsers and can be safely used with a fallback.
GRID
CONTAINER
The grid container is the parent of all grid items. It is
declared with the display: grid; rule.
GRID
ITEM
The items that are direct children of the grid container.
These are the elements that will be placed on the grid.
GRID
LINES
The lines that divide the columns and rows of the grid.
These are numbered starting with 1.
GRID
TRACK
The space between 2 adjacent grid lines. Essentially
your columns and rows.
GRID
CELL
The space between 2 adjacent grid column lines and 2
adjacent grid row lines.
GRID
AREA
The space between any 4 grid lines. It can cover any
number of rows and columns.
GRID TEMPLATE
COLUMNS
Defines the width of the columns in the grid.
grid-template-columns: 100px auto 200px;
GRID TEMPLATE
ROWS
Defines the height of the grid rows.
grid-template-rows: [row1-start] 224px [row2-start]
224px [end];
GRID COLUMN
GAP
Define the size of the grid lines between columns.
grid-column-gap: 30px;
GRID ROW
GAP
Defines the size of the grid lines between rows.
grid-row-gap: 40px;
GRID
GAP
Shorthand for row and column gap.
grid-gap: <grid-row-gap> <grid-column-gap>;
grid-gap: 40px 30px;
Note: The gap is only between
columns and rows. Not outside.
GRID
TEMPLATE AREA
Allows you to name sections of the grid.
grid-template-columns: 100px auto 200px;
grid-template-rows: [row1-start] 224px [row2-start] 224px [end];
grid-template-areas:
"header header header"
"content content sidebar";
FRACTIONAL (FR)
UNITS
Grid comes with the fr unit. Which uses up a fraction
of the remaining free space in the grid.
grid-template-columns: 1fr 50px 1fr 1fr;
REPEAT()
NOTATION
Allows you to easily repeat settings.
grid-template-columns: repeat(12, 1fr);
GRID COLUMN
START
Grid Column Start / Grid Column End | Grid Column
grid-column-start: 2;
grid-column-end: 4;
Shorthand
grid-column: 2 / 4;
GRID ROW
START
Grid Row Start / Grid Row End | Grid Row
grid-row-start: 1;
grid-row-end: 2;
Shorthand
grid-row: 1 / 2;
PLACING
GRID ITEMS
BUILDING
A LAYOUT
GRID AUTO
ROWS & COLUMNS
Set row or column sizes for those not explicitly set.
GRID AUTO
ROWS & COLUMNS
Set row or column sizes for those not explicitly set.
HOW TO
FALLBACK
CSS Grid is well supported by most recent browsers.
Of course we still have to support the likes of IE 11.
Rather than polyfill the best bet is to degrade
gracefully.
Example: https://preview.themes.pizza/zuul/blog/
LEARNING
MORE
CSSGrid.io by Wes Bos
CSS GRID
RESOURCES
CSSGrid.io - Wes Bos
A Complete Guide to Grid - CSS Tricks
Get Ready for CSS Grid Layout - A Book Apart
11 Things I Learned Reading The CSS Grid Specification - Ohans Emmanuel
How to recreate Medium’s article layout with CSS Grid - Per Harald Borgen
CSS Grid Spec - W3C
Firefox Developer Edition
CSS GRID
QUESTIONS
Twitter: @jason_yingling
Email: jason@jasonyingling.me

More Related Content

PDF
PPTX
JavaScript Basic
PDF
CSS Grid vs. Flexbox
PPTX
Flexbox
PPTX
DeepFake: Trick or Treat
PPTX
Html ppt
PPTX
Digital cameras and its types and specifications.
PPT
Introduction to html
JavaScript Basic
CSS Grid vs. Flexbox
Flexbox
DeepFake: Trick or Treat
Html ppt
Digital cameras and its types and specifications.
Introduction to html

What's hot (20)

PDF
CSS Day: CSS Grid Layout
PDF
Introduction to CSS Grid Layout
PDF
Flexbox and Grid Layout
PDF
World of CSS Grid
PDF
Introducing CSS Grid Layout
PPTX
1 03 - CSS Introduction
ODP
CSS Basics
PPTX
Flex box
PDF
Intro to HTML and CSS basics
PPSX
Introduction to css
PPT
Introduction to Cascading Style Sheets (CSS)
PPT
Oops concepts in php
PPTX
Html5 semantics
PDF
HTML5: features with examples
PPTX
CSS Flexbox (flexible box layout)
PPT
Cascading Style Sheets (CSS) help
PPTX
PPTX
Html links
PPT
PHP - Introduction to PHP Forms
CSS Day: CSS Grid Layout
Introduction to CSS Grid Layout
Flexbox and Grid Layout
World of CSS Grid
Introducing CSS Grid Layout
1 03 - CSS Introduction
CSS Basics
Flex box
Intro to HTML and CSS basics
Introduction to css
Introduction to Cascading Style Sheets (CSS)
Oops concepts in php
Html5 semantics
HTML5: features with examples
CSS Flexbox (flexible box layout)
Cascading Style Sheets (CSS) help
Html links
PHP - Introduction to PHP Forms
Ad

Similar to Introducing CSS Grid (20)

PDF
CSS Grid Layout for Topconf, Linz
PDF
An Event Apart SF: CSS Grid Layout
PDF
Devoxx Belgium: CSS Grid Layout
PDF
CSS Grid Layout - All Things Open
PDF
CSS Grid Layout
PDF
CSS Grid Layout for Frontend NE
PDF
An Event Apart Nashville: CSS Grid Layout
PDF
CSS Grid Layout - An Event Apart Orlando
PDF
The Grid - The Future of CSS Layout
PDF
CSS Grid Layout
PDF
CSS Grid Layout: An Event Apart Boston 2016
PDF
Talk Web Design: Get Ready For CSS Grid Layout
PDF
AEA Chicago CSS Grid Layout
PDF
CSS Grid Layout
PPT
17523630.ppt
PDF
Laying out the future with grid & flexbox - Smashing Conf Freiburg
PDF
CSS Grid layout - De volta para o futuro
PDF
DevFest Nantes - Start Using CSS Grid Layout today
PDF
CSS Grid Layout. Specification overview. Implementation status and roadmap (B...
PDF
Grid and Flexbox - Smashing Conf SF
CSS Grid Layout for Topconf, Linz
An Event Apart SF: CSS Grid Layout
Devoxx Belgium: CSS Grid Layout
CSS Grid Layout - All Things Open
CSS Grid Layout
CSS Grid Layout for Frontend NE
An Event Apart Nashville: CSS Grid Layout
CSS Grid Layout - An Event Apart Orlando
The Grid - The Future of CSS Layout
CSS Grid Layout
CSS Grid Layout: An Event Apart Boston 2016
Talk Web Design: Get Ready For CSS Grid Layout
AEA Chicago CSS Grid Layout
CSS Grid Layout
17523630.ppt
Laying out the future with grid & flexbox - Smashing Conf Freiburg
CSS Grid layout - De volta para o futuro
DevFest Nantes - Start Using CSS Grid Layout today
CSS Grid Layout. Specification overview. Implementation status and roadmap (B...
Grid and Flexbox - Smashing Conf SF
Ad

More from Jason Yingling (14)

PDF
WordPress Security Best Practices
PPTX
Installing WP-CLI locally
PPTX
Getting Started with Gutenberg Development
PPTX
Plugin development
PPTX
Customizing the WordPress Customizer
PDF
Battling Google PageSpeed Insights
PPTX
Putting the Develop in Development
PPTX
Getting to Know Underscores
PPTX
Speeding Up WordPress sites
PPTX
Creating Dynamic Sidebars & Widgets in WordPress
PPTX
WordPress Template hierarchy
PPTX
Design todevelop
PPTX
Ithemes presentation
PPTX
Building Flexible Sites with Advanced Custom Fields
WordPress Security Best Practices
Installing WP-CLI locally
Getting Started with Gutenberg Development
Plugin development
Customizing the WordPress Customizer
Battling Google PageSpeed Insights
Putting the Develop in Development
Getting to Know Underscores
Speeding Up WordPress sites
Creating Dynamic Sidebars & Widgets in WordPress
WordPress Template hierarchy
Design todevelop
Ithemes presentation
Building Flexible Sites with Advanced Custom Fields

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Encapsulation theory and applications.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Empathic Computing: Creating Shared Understanding
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Machine learning based COVID-19 study performance prediction
PDF
Modernizing your data center with Dell and AMD
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
cuic standard and advanced reporting.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
20250228 LYD VKU AI Blended-Learning.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Encapsulation theory and applications.pdf
Network Security Unit 5.pdf for BCA BBA.
Per capita expenditure prediction using model stacking based on satellite ima...
Reach Out and Touch Someone: Haptics and Empathic Computing
Empathic Computing: Creating Shared Understanding
Building Integrated photovoltaic BIPV_UPV.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Machine learning based COVID-19 study performance prediction
Modernizing your data center with Dell and AMD
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation_ Review paper, used for researhc scholars
cuic standard and advanced reporting.pdf
Understanding_Digital_Forensics_Presentation.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Review of recent advances in non-invasive hemoglobin estimation
Advanced methodologies resolving dimensionality complications for autism neur...

Introducing CSS Grid