SlideShare a Scribd company logo
2
Most read
4
Most read
10
Most read
IN A ROCKET
Learn front-end development at rocket speed
CSS FLEXBOX & CSS GRID
ContainerItems&
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
CSS GRID

LAYOUT
FLEXIBLE BOX

LAYOUT
Single-axis–oriented. Optimized for 2-dimensional layouts.
Flexbox focuses on space distribution within an axis.
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
CSS GRID

LAYOUT
FLEXIBLE BOX

LAYOUT
Single-axis–oriented. Optimized for 2-dimensional layouts.
Flexbox focuses on space distribution within an axis.
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
FLEXBOX
Flex container
Flex

item
Flex

item
Flex

item
Any HTML element
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
Flex

container CAN BE
Block
Inline
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
display
flex

inline-flex
(default)
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
display
flex
inline-flex
(default)
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
Flex container
width = block (100%)
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
Content goes here.
Flex item
Flex container
Width and height defined by its content.
Content goes here.
Flex item
Even more content goes here.
Flex item
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
DISPLAY FLEX
<body>
<div class="container">
<div>Item1</div>
<div>Item2</div>
<div>Item3</div>
<div>Item4 here</div>
</div>
</body>
HTML CSS
.container {display: flex;}
Browser
Web page title
index.html
Item1 Item2 Item3 Item4 here container
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
DISPLAY FLEX
<body>
<ul class="container">
<li>Item1</li>
<li>Item2</li>
<li>Item3</li>
<li>Item4 here</li>
</ul>
</body>
HTML CSS
.container {display: flex;}
Browser
Web page title
index.html
Item1 Item2 Item3 containerItem4 here
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
display
flex

inline-flex
(default)
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
Flex container
width = inline
Other inline elements

could go here.
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
Content goes here. Content goes here. Even more content goes here.
Flex item
Flex container
Width and hight defined by its content.
Flex item Flex item
Other inline elements

could go here.
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
DISPLAY INLINE-FLEX
<body>
<div class="container">
<div>Item1</div>
<div>Item2</div>
<div>Item3</div>
<div>Item4 here</div>
</div>
</body>
HTML CSS
.container {display: inline-flex;}
Browser
Web page title
index.html
containerItem1 Item2 Item3 Item4 here
FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com
display
flex

inline-flex
(default)
Learn front-end development at rocket speed
inarocket.com
by miguelsanchez.com
YOU CAN CONTINUE THIS COURSE FOR FREE ON
+ READY TO USE CODE
+ QUIZZES
+ FREE UPDATES
We respect your time

No more blah blah videos. Just straight to
the point slides with relevant information.
Ready to use code

Real code you can just copy and paste into
your real projects.
Step by step guides

Clear and concise steps to build real use
solutions. No missed points.
Learn front-end development at rocket speed
inarocket.com
IN A ROCKET
Learn front-end development at rocket speed
CSS FLEXBOX & CSS GRID
ContainerItems&

More Related Content

PDF
1- Learn Flexbox & CSS Grid / Environment setup
PDF
2- Learn Flexbox & CSS Grid / Context
PDF
CSS Selectors
PDF
Magento x codekit x sass x compass x skeleton responsive grid
PPTX
Intro to Flexbox - A Magical CSS Property
PDF
Agile CSS development with Compass and Sass
PDF
Progressive enhancement - Bridging the gap between CSS2 and CSS3
PDF
Progressive enhancement
1- Learn Flexbox & CSS Grid / Environment setup
2- Learn Flexbox & CSS Grid / Context
CSS Selectors
Magento x codekit x sass x compass x skeleton responsive grid
Intro to Flexbox - A Magical CSS Property
Agile CSS development with Compass and Sass
Progressive enhancement - Bridging the gap between CSS2 and CSS3
Progressive enhancement

Similar to 3- Learn Flexbox & CSS Grid / Container & items (20)

PPTX
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
PDF
Flexbox Will Shock You!
PDF
Show & tell - Flex in flux
PDF
Leveling Up with Flexbox (Smashing Conference)
PDF
Render Conf: Start using CSS Grid Layout Today
PPTX
CSS Flexbox (flexible box layout)
PPTX
flexbox report
PDF
Leveling Up With Flexbox (Smart Web Conference)
PDF
A complete guide to flexbox
PDF
Grid and Flexbox - Smashing Conf SF
PDF
CSSConf.asia - Laying out the future
PDF
CSS Lessons Learned The Hard Way – Zoe Gillenwater
PDF
CSS Lessons Learned the Hard Way (Beyond Tellerand)
PDF
The New CSS Layout - dotCSS
PDF
Confoo: The New CSS Layout
PDF
Laracon Online: Grid and Flexbox
PDF
Building Layouts with CSS
PDF
CSS Flexbox and Grid Layouts
PPTX
MTA css layouts
PDF
Is Flexbox the Future of Layout?
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
Flexbox Will Shock You!
Show & tell - Flex in flux
Leveling Up with Flexbox (Smashing Conference)
Render Conf: Start using CSS Grid Layout Today
CSS Flexbox (flexible box layout)
flexbox report
Leveling Up With Flexbox (Smart Web Conference)
A complete guide to flexbox
Grid and Flexbox - Smashing Conf SF
CSSConf.asia - Laying out the future
CSS Lessons Learned The Hard Way – Zoe Gillenwater
CSS Lessons Learned the Hard Way (Beyond Tellerand)
The New CSS Layout - dotCSS
Confoo: The New CSS Layout
Laracon Online: Grid and Flexbox
Building Layouts with CSS
CSS Flexbox and Grid Layouts
MTA css layouts
Is Flexbox the Future of Layout?
Ad

More from In a Rocket (14)

PDF
17- Learn CSS Fundamentals / Units
PDF
16- Learn CSS Fundamentals / Background
PDF
15- Learn CSS Fundamentals / Color
PDF
14- Learn CSS Fundamentals / Inheritance
PDF
13- Learn CSS Fundamentals / Specificity
PDF
12- Learn CSS Fundamentals / Mix & group
PDF
11- Learn CSS Fundamentals / Combinators
PDF
10- Learn CSS Fundamentals / Pseudo-elements
PDF
9- Learn CSS Fundamentals / Pseudo-classes
PDF
8- Learn CSS Fundamentals / Attribute selectors
PDF
2- Learn HTML Fundamentals / Text Formatting
PDF
1- Learn HTML Fundamentals / Start in 5 Minutes
PDF
Learn SUIT: CSS Naming Convention
PDF
Learn BEM: CSS Naming Convention
17- Learn CSS Fundamentals / Units
16- Learn CSS Fundamentals / Background
15- Learn CSS Fundamentals / Color
14- Learn CSS Fundamentals / Inheritance
13- Learn CSS Fundamentals / Specificity
12- Learn CSS Fundamentals / Mix & group
11- Learn CSS Fundamentals / Combinators
10- Learn CSS Fundamentals / Pseudo-elements
9- Learn CSS Fundamentals / Pseudo-classes
8- Learn CSS Fundamentals / Attribute selectors
2- Learn HTML Fundamentals / Text Formatting
1- Learn HTML Fundamentals / Start in 5 Minutes
Learn SUIT: CSS Naming Convention
Learn BEM: CSS Naming Convention
Ad

Recently uploaded (20)

PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PPT
tcp ip networks nd ip layering assotred slides
PPTX
SAP Ariba Sourcing PPT for learning material
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
The Internet -By the Numbers, Sri Lanka Edition
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
DOCX
Unit-3 cyber security network security of internet system
PPTX
Internet___Basics___Styled_ presentation
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PDF
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PPTX
innovation process that make everything different.pptx
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPTX
international classification of diseases ICD-10 review PPT.pptx
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PPTX
E -tech empowerment technologies PowerPoint
SASE Traffic Flow - ZTNA Connector-1.pdf
RPKI Status Update, presented by Makito Lay at IDNOG 10
Decoding a Decade: 10 Years of Applied CTI Discipline
Design_with_Watersergyerge45hrbgre4top (1).ppt
tcp ip networks nd ip layering assotred slides
SAP Ariba Sourcing PPT for learning material
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
The Internet -By the Numbers, Sri Lanka Edition
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
Unit-3 cyber security network security of internet system
Internet___Basics___Styled_ presentation
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
Slides PPTX World Game (s) Eco Economic Epochs.pptx
innovation process that make everything different.pptx
Paper PDF World Game (s) Great Redesign.pdf
international classification of diseases ICD-10 review PPT.pptx
introduction about ICD -10 & ICD-11 ppt.pptx
E -tech empowerment technologies PowerPoint

3- Learn Flexbox & CSS Grid / Container & items

  • 1. IN A ROCKET Learn front-end development at rocket speed CSS FLEXBOX & CSS GRID ContainerItems&
  • 2. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com CSS GRID
 LAYOUT FLEXIBLE BOX
 LAYOUT Single-axis–oriented. Optimized for 2-dimensional layouts. Flexbox focuses on space distribution within an axis.
  • 3. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com CSS GRID
 LAYOUT FLEXIBLE BOX
 LAYOUT Single-axis–oriented. Optimized for 2-dimensional layouts. Flexbox focuses on space distribution within an axis.
  • 4. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com FLEXBOX Flex container Flex
 item Flex
 item Flex
 item Any HTML element
  • 5. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com Flex
 container CAN BE Block Inline
  • 6. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com display flex inline-flex (default)
  • 7. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com display flex inline-flex (default)
  • 8. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com Flex container width = block (100%)
  • 9. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com Content goes here. Flex item Flex container Width and height defined by its content. Content goes here. Flex item Even more content goes here. Flex item
  • 10. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com DISPLAY FLEX <body> <div class="container"> <div>Item1</div> <div>Item2</div> <div>Item3</div> <div>Item4 here</div> </div> </body> HTML CSS .container {display: flex;} Browser Web page title index.html Item1 Item2 Item3 Item4 here container
  • 11. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com DISPLAY FLEX <body> <ul class="container"> <li>Item1</li> <li>Item2</li> <li>Item3</li> <li>Item4 here</li> </ul> </body> HTML CSS .container {display: flex;} Browser Web page title index.html Item1 Item2 Item3 containerItem4 here
  • 12. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com display flex inline-flex (default)
  • 13. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com Flex container width = inline Other inline elements
 could go here.
  • 14. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com Content goes here. Content goes here. Even more content goes here. Flex item Flex container Width and hight defined by its content. Flex item Flex item Other inline elements
 could go here.
  • 15. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com DISPLAY INLINE-FLEX <body> <div class="container"> <div>Item1</div> <div>Item2</div> <div>Item3</div> <div>Item4 here</div> </div> </body> HTML CSS .container {display: inline-flex;} Browser Web page title index.html containerItem1 Item2 Item3 Item4 here
  • 16. FLEXBOX & CSS GRID: The CSS layout nightmare is over inarocket.com display flex inline-flex (default)
  • 17. Learn front-end development at rocket speed inarocket.com by miguelsanchez.com YOU CAN CONTINUE THIS COURSE FOR FREE ON + READY TO USE CODE + QUIZZES + FREE UPDATES
  • 18. We respect your time
 No more blah blah videos. Just straight to the point slides with relevant information. Ready to use code
 Real code you can just copy and paste into your real projects. Step by step guides
 Clear and concise steps to build real use solutions. No missed points. Learn front-end development at rocket speed inarocket.com
  • 19. IN A ROCKET Learn front-end development at rocket speed CSS FLEXBOX & CSS GRID ContainerItems&