SlideShare a Scribd company logo
1 of 13
Flexbox in CSS
{
}
...
Flexbox basically a layout module of CSS
Before the Flexbox Layout module, there were four layout modes:
• Table, for two-dimensional table data
• Positioned, for explicit position of an element
} ..
First of all we need a container where all the elements are direct
child of the container.
Property of Container.
• flex-direction
• flex-wrap
• flex-flow
• justify-content
• align-items
• align-content
The flex-direction Property
The flex-direction property defines in which direction the
container wants to stack the flex items.
} ..
flex-direction: column - stacks the flex items vertically (from top to
bottom).
|| column-reverse;- value stacks the flex items vertically (but from
bottom to top)
|| row;- value stacks the flex items horizontally (from left to right)
row-reverse;- stacks the flex items horizontally (but from right to
left)
The flex-wrap Property
The flex-wrap property specifies whether the flex items should
wrap or not.
} ..
flex-wrap: wrap;- specifies that the flex items will wrap if necessary
|| nowrap;- specifies that the flex items will not wrap (this is default)
|| wrap-reverse;- specifies that the flexible items will wrap if
necessary, in reverse order.
row-reverse;- stacks the flex items horizontally (but from right to left)
**The flex-flow property is a shorthand property for setting both the
flex-direction and flex-wrap properties.
flex-flow: row wrap;
The justify-content Property
The justify-content property is used to align the flex items:
} ..
justify-content: center; aligns the flex items at the center of the
container
|| flex-start; aligns the flex items at the beginning of the container
(this is default)
|| flex-end; aligns the flex items at the end of the container.
|| space-around; displays the flex items with space before, between,
and after the lines.
|| space-between; displays the flex items with space between the lines
The align-items Property
The align-items property is used to align the flex items.
} ..
align-items: center; aligns the flex items in the middle of the
container
|| flex-start; aligns the flex items at the top of the container
|| flex-end; aligns the flex items at the bottom of the container
|| stretch; stretches the flex items to fill the container (this is
default)
CSS Flex Items
The align-content property is used to align the flex lines.
} ..
The flex item properties are:
• order
• flex-grow
• flex-shrink
• flex-basis
• flex
• align-self
}
...
The order Property: The order property specifies the order of the
flex items.
<div class="flex-container">
<div style="order: 3">1</div>
<div style="order: 2">2</div>
<div style="order: 4">3</div>
<div style="order: 1">4</div>
</div>
The flex-grow Property: The flex-grow property specifies how much a
flex item will grow relative to the rest of the flex items.
<div class="flex-container">
<div style="flex-grow: 1">1</div>
<div style="flex-grow: 1">2</div>
<div style="flex-grow: 8">3</div>
</div>
Make a Image
Gallery
{
}
...
What is The Hero Section.
As the first thing people see when they visit your
website, a hero section is the area that immediately
shows up on the screen under your logo and menu.
• What you have to offer
• Why people should trust you
• The benefits of working with you
• What action they should take next
Any Questions?
{
} ..
..
Rashedul Islam Emon
email: emonrasedul@gmail.com
Phone: +8801837995395
{
} ..
..

More Related Content

Similar to digital swifton

CSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS LayoutCSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS LayoutRachel Andrew
 
Intro to Flexbox with Real Word Examples
Intro to Flexbox with Real Word ExamplesIntro to Flexbox with Real Word Examples
Intro to Flexbox with Real Word ExamplesJennifer Bland
 
CSS Flexbox (flexible box layout)
CSS Flexbox (flexible box layout)CSS Flexbox (flexible box layout)
CSS Flexbox (flexible box layout)Woodridge Software
 
#4 HTML & CSS [know-how]
#4 HTML & CSS [know-how]#4 HTML & CSS [know-how]
#4 HTML & CSS [know-how]Dalibor Gogic
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid LayoutRachel Andrew
 
How to choose best containers in STL (C++)
How to choose best containers in STL (C++)How to choose best containers in STL (C++)
How to choose best containers in STL (C++)Sangharsh agarwal
 
Building Layouts with CSS
Building Layouts with CSSBuilding Layouts with CSS
Building Layouts with CSSBoris Paillard
 
Flexbox and Grid Layout: How you will structure layouts tomorrow.
Flexbox and Grid Layout: How you will structure layouts tomorrow.Flexbox and Grid Layout: How you will structure layouts tomorrow.
Flexbox and Grid Layout: How you will structure layouts tomorrow.Diego Eis
 
Future Layout & Performance
Future Layout & PerformanceFuture Layout & Performance
Future Layout & PerformanceRachel Andrew
 
But what about old browsers?
But what about old browsers?But what about old browsers?
But what about old browsers?Rachel Andrew
 
CSS Flexbox and Grid Layouts
CSS Flexbox and Grid LayoutsCSS Flexbox and Grid Layouts
CSS Flexbox and Grid LayoutsAnantha kumar
 
Is Flexbox the Future of Layout?
Is Flexbox the Future of Layout?Is Flexbox the Future of Layout?
Is Flexbox the Future of Layout?jameswillweb
 
Understanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdfUnderstanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdfKaty Slemon
 
Introduction to flexbox
Introduction  to  flexboxIntroduction  to  flexbox
Introduction to flexboxJyoti Gautam
 
Flexbox Will Shock You!
Flexbox Will Shock You!Flexbox Will Shock You!
Flexbox Will Shock You!Scott Vandehey
 
WEBD 162: display property, Float and Clear
WEBD 162: display property, Float and ClearWEBD 162: display property, Float and Clear
WEBD 162: display property, Float and Clearpalomateach
 
CSS3 Flexbox & Responsive Design
CSS3 Flexbox & Responsive DesignCSS3 Flexbox & Responsive Design
CSS3 Flexbox & Responsive DesignArash Milani
 

Similar to digital swifton (20)

CSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS LayoutCSS Conf Budapest - New CSS Layout
CSS Conf Budapest - New CSS Layout
 
Intro to Flexbox with Real Word Examples
Intro to Flexbox with Real Word ExamplesIntro to Flexbox with Real Word Examples
Intro to Flexbox with Real Word Examples
 
2. react - native: basic
2. react - native: basic2. react - native: basic
2. react - native: basic
 
CSS Flexbox (flexible box layout)
CSS Flexbox (flexible box layout)CSS Flexbox (flexible box layout)
CSS Flexbox (flexible box layout)
 
#4 HTML & CSS [know-how]
#4 HTML & CSS [know-how]#4 HTML & CSS [know-how]
#4 HTML & CSS [know-how]
 
css.pdf
css.pdfcss.pdf
css.pdf
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
 
How to choose best containers in STL (C++)
How to choose best containers in STL (C++)How to choose best containers in STL (C++)
How to choose best containers in STL (C++)
 
Building Layouts with CSS
Building Layouts with CSSBuilding Layouts with CSS
Building Layouts with CSS
 
Flexbox and Grid Layout: How you will structure layouts tomorrow.
Flexbox and Grid Layout: How you will structure layouts tomorrow.Flexbox and Grid Layout: How you will structure layouts tomorrow.
Flexbox and Grid Layout: How you will structure layouts tomorrow.
 
Future Layout & Performance
Future Layout & PerformanceFuture Layout & Performance
Future Layout & Performance
 
But what about old browsers?
But what about old browsers?But what about old browsers?
But what about old browsers?
 
CSS Flexbox and Grid Layouts
CSS Flexbox and Grid LayoutsCSS Flexbox and Grid Layouts
CSS Flexbox and Grid Layouts
 
Is Flexbox the Future of Layout?
Is Flexbox the Future of Layout?Is Flexbox the Future of Layout?
Is Flexbox the Future of Layout?
 
MTA css layouts
MTA css layoutsMTA css layouts
MTA css layouts
 
Understanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdfUnderstanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdf
 
Introduction to flexbox
Introduction  to  flexboxIntroduction  to  flexbox
Introduction to flexbox
 
Flexbox Will Shock You!
Flexbox Will Shock You!Flexbox Will Shock You!
Flexbox Will Shock You!
 
WEBD 162: display property, Float and Clear
WEBD 162: display property, Float and ClearWEBD 162: display property, Float and Clear
WEBD 162: display property, Float and Clear
 
CSS3 Flexbox & Responsive Design
CSS3 Flexbox & Responsive DesignCSS3 Flexbox & Responsive Design
CSS3 Flexbox & Responsive Design
 

Recently uploaded

The 9th May Incident in Pakistan A Turning Point in History.pptx
The 9th May Incident in Pakistan A Turning Point in History.pptxThe 9th May Incident in Pakistan A Turning Point in History.pptx
The 9th May Incident in Pakistan A Turning Point in History.pptxelizabethella096
 
Resumé Karina Perez | Digital Strategist
Resumé Karina Perez | Digital StrategistResumé Karina Perez | Digital Strategist
Resumé Karina Perez | Digital StrategistKarina Perez
 
SP Search Term Data Optimization Template.pdf
SP Search Term Data Optimization Template.pdfSP Search Term Data Optimization Template.pdf
SP Search Term Data Optimization Template.pdfPauleneNicoleLapira
 
The Impact Of Social Media Advertising.pdf
The Impact Of Social Media Advertising.pdfThe Impact Of Social Media Advertising.pdf
The Impact Of Social Media Advertising.pdfishikajaiswal116
 
10 Email Marketing Best Practices to Increase Engagements, CTR, And ROI
10 Email Marketing Best Practices to Increase Engagements, CTR, And ROI10 Email Marketing Best Practices to Increase Engagements, CTR, And ROI
10 Email Marketing Best Practices to Increase Engagements, CTR, And ROIShamsudeen Adeshokan
 
Alpha Media March 2024 Buyers Guide.pptx
Alpha Media March 2024 Buyers Guide.pptxAlpha Media March 2024 Buyers Guide.pptx
Alpha Media March 2024 Buyers Guide.pptxDave McCallum
 
HOW TO HANDLE SALES OBJECTIONS | SELLING AND NEGOTIATION
HOW TO HANDLE SALES OBJECTIONS | SELLING AND NEGOTIATIONHOW TO HANDLE SALES OBJECTIONS | SELLING AND NEGOTIATION
HOW TO HANDLE SALES OBJECTIONS | SELLING AND NEGOTIATIONpratheeshraj987
 
2024 Social Trends Report V4 from Later.com
2024 Social Trends Report V4 from Later.com2024 Social Trends Report V4 from Later.com
2024 Social Trends Report V4 from Later.comnmislamchannal
 
Elevating Your Digital Presence by Evitha.pdf
Elevating Your Digital Presence by Evitha.pdfElevating Your Digital Presence by Evitha.pdf
Elevating Your Digital Presence by Evitha.pdfevithatojoparel
 
Micro-Choices, Max Impact Personalizing Your Journey, One Moment at a Time.pdf
Micro-Choices, Max Impact Personalizing Your Journey, One Moment at a Time.pdfMicro-Choices, Max Impact Personalizing Your Journey, One Moment at a Time.pdf
Micro-Choices, Max Impact Personalizing Your Journey, One Moment at a Time.pdfPiyush Kumar
 
The Art of sales from fictional characters.
The Art of sales from fictional characters.The Art of sales from fictional characters.
The Art of sales from fictional characters.Bharathi sakthi
 
Social Media Marketing Portfolio - Maharsh Benday
Social Media Marketing Portfolio - Maharsh BendaySocial Media Marketing Portfolio - Maharsh Benday
Social Media Marketing Portfolio - Maharsh BendayMaharshBenday
 
VIP Call Girls Dongri WhatsApp +91-9833363713, Full Night Service
VIP Call Girls Dongri WhatsApp +91-9833363713, Full Night ServiceVIP Call Girls Dongri WhatsApp +91-9833363713, Full Night Service
VIP Call Girls Dongri WhatsApp +91-9833363713, Full Night Servicemeghakumariji156
 
How consumers use technology and the impacts on their lives
How consumers use technology and the impacts on their livesHow consumers use technology and the impacts on their lives
How consumers use technology and the impacts on their livesMathuraa
 
Crypto Quantum Leap - Digital - membership area
Crypto Quantum Leap -  Digital - membership areaCrypto Quantum Leap -  Digital - membership area
Crypto Quantum Leap - Digital - membership areajaynee G
 
Gain potential customers through Lead Generation
Gain potential customers through Lead GenerationGain potential customers through Lead Generation
Gain potential customers through Lead Generationvidhyalakshmiveerapp
 
Optimizing Your Marketing with AI-Powered Prompts
Optimizing Your Marketing with AI-Powered PromptsOptimizing Your Marketing with AI-Powered Prompts
Optimizing Your Marketing with AI-Powered PromptsVbout.com
 
Cartona.pptx. Marketing how to present your project very well , discussed a...
Cartona.pptx.   Marketing how to present your project very well , discussed a...Cartona.pptx.   Marketing how to present your project very well , discussed a...
Cartona.pptx. Marketing how to present your project very well , discussed a...BeshoyFawaz1
 
Instant Digital Issuance: An Overview With Critical First Touch Best Practices
Instant Digital Issuance: An Overview With Critical First Touch Best PracticesInstant Digital Issuance: An Overview With Critical First Touch Best Practices
Instant Digital Issuance: An Overview With Critical First Touch Best PracticesMedia Logic
 

Recently uploaded (20)

The 9th May Incident in Pakistan A Turning Point in History.pptx
The 9th May Incident in Pakistan A Turning Point in History.pptxThe 9th May Incident in Pakistan A Turning Point in History.pptx
The 9th May Incident in Pakistan A Turning Point in History.pptx
 
Resumé Karina Perez | Digital Strategist
Resumé Karina Perez | Digital StrategistResumé Karina Perez | Digital Strategist
Resumé Karina Perez | Digital Strategist
 
SP Search Term Data Optimization Template.pdf
SP Search Term Data Optimization Template.pdfSP Search Term Data Optimization Template.pdf
SP Search Term Data Optimization Template.pdf
 
The Impact Of Social Media Advertising.pdf
The Impact Of Social Media Advertising.pdfThe Impact Of Social Media Advertising.pdf
The Impact Of Social Media Advertising.pdf
 
10 Email Marketing Best Practices to Increase Engagements, CTR, And ROI
10 Email Marketing Best Practices to Increase Engagements, CTR, And ROI10 Email Marketing Best Practices to Increase Engagements, CTR, And ROI
10 Email Marketing Best Practices to Increase Engagements, CTR, And ROI
 
Alpha Media March 2024 Buyers Guide.pptx
Alpha Media March 2024 Buyers Guide.pptxAlpha Media March 2024 Buyers Guide.pptx
Alpha Media March 2024 Buyers Guide.pptx
 
HOW TO HANDLE SALES OBJECTIONS | SELLING AND NEGOTIATION
HOW TO HANDLE SALES OBJECTIONS | SELLING AND NEGOTIATIONHOW TO HANDLE SALES OBJECTIONS | SELLING AND NEGOTIATION
HOW TO HANDLE SALES OBJECTIONS | SELLING AND NEGOTIATION
 
2024 Social Trends Report V4 from Later.com
2024 Social Trends Report V4 from Later.com2024 Social Trends Report V4 from Later.com
2024 Social Trends Report V4 from Later.com
 
Elevating Your Digital Presence by Evitha.pdf
Elevating Your Digital Presence by Evitha.pdfElevating Your Digital Presence by Evitha.pdf
Elevating Your Digital Presence by Evitha.pdf
 
Micro-Choices, Max Impact Personalizing Your Journey, One Moment at a Time.pdf
Micro-Choices, Max Impact Personalizing Your Journey, One Moment at a Time.pdfMicro-Choices, Max Impact Personalizing Your Journey, One Moment at a Time.pdf
Micro-Choices, Max Impact Personalizing Your Journey, One Moment at a Time.pdf
 
The Art of sales from fictional characters.
The Art of sales from fictional characters.The Art of sales from fictional characters.
The Art of sales from fictional characters.
 
Social Media Marketing Portfolio - Maharsh Benday
Social Media Marketing Portfolio - Maharsh BendaySocial Media Marketing Portfolio - Maharsh Benday
Social Media Marketing Portfolio - Maharsh Benday
 
VIP Call Girls Dongri WhatsApp +91-9833363713, Full Night Service
VIP Call Girls Dongri WhatsApp +91-9833363713, Full Night ServiceVIP Call Girls Dongri WhatsApp +91-9833363713, Full Night Service
VIP Call Girls Dongri WhatsApp +91-9833363713, Full Night Service
 
How consumers use technology and the impacts on their lives
How consumers use technology and the impacts on their livesHow consumers use technology and the impacts on their lives
How consumers use technology and the impacts on their lives
 
Crypto Quantum Leap - Digital - membership area
Crypto Quantum Leap -  Digital - membership areaCrypto Quantum Leap -  Digital - membership area
Crypto Quantum Leap - Digital - membership area
 
Gain potential customers through Lead Generation
Gain potential customers through Lead GenerationGain potential customers through Lead Generation
Gain potential customers through Lead Generation
 
Optimizing Your Marketing with AI-Powered Prompts
Optimizing Your Marketing with AI-Powered PromptsOptimizing Your Marketing with AI-Powered Prompts
Optimizing Your Marketing with AI-Powered Prompts
 
4 TRIK CARA MENGGUGURKAN JANIN ATAU ABORSI KANDUNGAN
4 TRIK CARA MENGGUGURKAN JANIN ATAU ABORSI KANDUNGAN4 TRIK CARA MENGGUGURKAN JANIN ATAU ABORSI KANDUNGAN
4 TRIK CARA MENGGUGURKAN JANIN ATAU ABORSI KANDUNGAN
 
Cartona.pptx. Marketing how to present your project very well , discussed a...
Cartona.pptx.   Marketing how to present your project very well , discussed a...Cartona.pptx.   Marketing how to present your project very well , discussed a...
Cartona.pptx. Marketing how to present your project very well , discussed a...
 
Instant Digital Issuance: An Overview With Critical First Touch Best Practices
Instant Digital Issuance: An Overview With Critical First Touch Best PracticesInstant Digital Issuance: An Overview With Critical First Touch Best Practices
Instant Digital Issuance: An Overview With Critical First Touch Best Practices
 

digital swifton

  • 2. Flexbox basically a layout module of CSS Before the Flexbox Layout module, there were four layout modes: • Table, for two-dimensional table data • Positioned, for explicit position of an element } .. First of all we need a container where all the elements are direct child of the container. Property of Container. • flex-direction • flex-wrap • flex-flow • justify-content • align-items • align-content
  • 3. The flex-direction Property The flex-direction property defines in which direction the container wants to stack the flex items. } .. flex-direction: column - stacks the flex items vertically (from top to bottom). || column-reverse;- value stacks the flex items vertically (but from bottom to top) || row;- value stacks the flex items horizontally (from left to right) row-reverse;- stacks the flex items horizontally (but from right to left)
  • 4. The flex-wrap Property The flex-wrap property specifies whether the flex items should wrap or not. } .. flex-wrap: wrap;- specifies that the flex items will wrap if necessary || nowrap;- specifies that the flex items will not wrap (this is default) || wrap-reverse;- specifies that the flexible items will wrap if necessary, in reverse order. row-reverse;- stacks the flex items horizontally (but from right to left) **The flex-flow property is a shorthand property for setting both the flex-direction and flex-wrap properties. flex-flow: row wrap;
  • 5. The justify-content Property The justify-content property is used to align the flex items: } .. justify-content: center; aligns the flex items at the center of the container || flex-start; aligns the flex items at the beginning of the container (this is default) || flex-end; aligns the flex items at the end of the container. || space-around; displays the flex items with space before, between, and after the lines. || space-between; displays the flex items with space between the lines
  • 6. The align-items Property The align-items property is used to align the flex items. } .. align-items: center; aligns the flex items in the middle of the container || flex-start; aligns the flex items at the top of the container || flex-end; aligns the flex items at the bottom of the container || stretch; stretches the flex items to fill the container (this is default)
  • 7. CSS Flex Items The align-content property is used to align the flex lines. } .. The flex item properties are: • order • flex-grow • flex-shrink • flex-basis • flex • align-self
  • 8. } ... The order Property: The order property specifies the order of the flex items. <div class="flex-container"> <div style="order: 3">1</div> <div style="order: 2">2</div> <div style="order: 4">3</div> <div style="order: 1">4</div> </div> The flex-grow Property: The flex-grow property specifies how much a flex item will grow relative to the rest of the flex items. <div class="flex-container"> <div style="flex-grow: 1">1</div> <div style="flex-grow: 1">2</div> <div style="flex-grow: 8">3</div> </div>
  • 10. What is The Hero Section. As the first thing people see when they visit your website, a hero section is the area that immediately shows up on the screen under your logo and menu. • What you have to offer • Why people should trust you • The benefits of working with you • What action they should take next
  • 11.
  • 13. Rashedul Islam Emon email: emonrasedul@gmail.com Phone: +8801837995395 { } .. ..