Cheat Sheet CSS Flex & Grid - Tailwind CSS by Abubakar
Cheat Sheet CSS Flex & Grid - Tailwind CSS by Abubakar
Cheat Sheet CSS Flex & Grid - Tailwind CSS by Abubakar
8
CHEAT SHEET 4.7 Solution 1 Center a div .................................................. 8
4.8 Solution 2 Center a div .................................................. 8
CSS FLEX & GRID - TAILWIND CSS
5. Flex Direction ....................................................................... 8
Prepared By
5.1 Possible Solution Flex Direction .................................... 8
Abubakar Siddique
5.2 Better Solution Flex Direction ....................................... 8
[email protected]
5.3 Understanding Flex Direction ........................................ 8
+923017362696
5.4 Main Axis and Cross Axis ............................................... 9
TABLE OF CONTENTS
5.5 Testimonial Card ........................................................... 9
1. Display Flex ..........................................................................5 5.6 Solution Testimonial Card ............................................. 9
1.1 Quotes Side-by-Side ......................................................5 5.7 Alternating List of Profiles ............................................. 9
Solution 1.1 Quotes Side-by-Side ........................................5 5.8 Markup Alternating List of Profiles ............................... 9
1.2 Understanding Display Flex ...........................................5 5.9 Solution Alternating List of Profiles ............................... 9
2. Justify Content .....................................................................5 6. Flex Grow ............................................................................. 9
2.1 Tabs Spaced Out ............................................................5 6.1 Markup Flex Grow ......................................................... 9
2.2 Understanding Justify Content ......................................5 6.2 Solution Flex Grow ........................................................ 9
2.3 justify-content: flex-start; ..............................................5 6.3 Understanding Flex Grow .............................................. 9
2.4 justify-content: flex-end; ...............................................5 6.4 Sticky Footer ................................................................ 10
2.5 justify-content: center; ..................................................5 6.5 Markup Sticky Footer .................................................. 10
2.6 justify-content: space-between; ....................................5 6.6 Solution Sticky Footer ................................................. 10
2.7 justify-content: space-around; ......................................5 6.7 Card with Header & Footer ......................................... 10
2.8 justify-content: space-evenly; .......................................6 6.8 Tabs Hover Effect ........................................................ 10
2.9 Card with Previous & Next Links ....................................6 6.9 Solution Tabs Hover Effect .......................................... 10
2.10 Team Profiles ...............................................................6 6.10 Variable Width Responsive Buttons .......................... 10
3. Flex Wrap .............................................................................6 6.11 Markup Variable Width Responsive Buttons ............ 11
3.1 Solution flex-wrap .........................................................6 6.12 Solution Variable Width Responsive Buttons ............ 11
3.1 Understanding Flex Wrap ..............................................6 7. Flex Shrink .......................................................................... 11
3.2 Logos Wrapped ..............................................................6 7.1 Itinerary ....................................................................... 11
3.3 Solution Logos Wrapped ................................................6 7.2 Markup Itinerary ......................................................... 11
4. Align Items ...........................................................................7 7.3 Solution Itinerary ......................................................... 11
4.1 Icon and Text .................................................................7 7.4 Understanding Flex Shrink .......................................... 11
4.1 Solution Icon and Text ...................................................7 7.5 Profile Card – Large ..................................................... 11
4.2 Understanding Align Items ............................................7 7.6 Markup Profile Card – Large ........................................ 11
4.3 Profile Card – Small........................................................7 7.7 Solution Profile Card – Large ....................................... 11
4.4 Services Section .............................................................7 8. Flex Basis ............................................................................ 11
4.5 Frequent Questions .......................................................8 8.1 Split Screen Display ..................................................... 11
Page 1 of 32
8.2 Markup Split Screen Display ........................................12 12.4 Markup Profile with Rating ....................................... 16
8.3 Possible Solution 1 Split Screen Display ......................12 12.5 Solution Profile with Rating ....................................... 16
8.4 Possible Solution 2 Split Screen Display ......................12 13. Align Content ................................................................... 16
8.5 Better Solution Split Screen Display ............................12 13.1 Full Page Testimonials Section .................................. 16
8.6 Understanding Flex Basis .............................................12 13.2 Markup Full Page Testimonials Section ..................... 17
8.7 Blog Post Display .........................................................12 13.3 Solution Full Page Testimonials Section .................... 17
8.8 Markup Blog Post Display ............................................12 13.4 Understanding Align Content .................................... 17
8.9 Solution Blog Post Display ...........................................12 14. Inline Flex ......................................................................... 17
8.10 Pricing Plans ...............................................................13 14.1 Social Media Icons ..................................................... 17
8.11 Markup Pricing Plans .................................................13 14.2 Markup Social Media Icons ....................................... 17
8.12 Possible Solution Pricing Plans ..................................13 14.3 Solution Social Media Icons ....................................... 17
8.13 Better Solution Pricing Plans .....................................13 14.4 Understanding Inline Flex.......................................... 17
9. Flex Shorthand Property ....................................................13 14.5 Comprehensive Examples for Flexbox ...................... 18
9.1 Understanding Flex ......................................................13 14.5.1 Article Preview ................................................... 18
9.2 Navigation Bar with Centered Menu ...........................13 14.5.2 Fitness Report .................................................... 18
9.3 Markup Navigation Bar with Centered Menu .............14 14.5.3 Tweet ................................................................. 18
9.4 Solution Navigation Bar with Centered Menu .............14 16. Display Grid & Grid Template Columns ........................... 18
9.5 Image and Text in 2:1 Ratio .........................................14 16.1 Full Page Gallery ........................................................ 18
9.6 Markup Image and Text in 2:1 Ratio ...........................14 16.2 Markup Full Page Gallery .......................................... 18
9.7 Solution Image and Text in 2:1 Ratio ...........................14 16.3 Solution Full Page Gallery .......................................... 18
10. Auto Margins....................................................................14 16.4 Understanding Display Grid ...................................... 18
10.1 Notifications Menu Item............................................14 16.5 Understanding Grid Template Columns .................... 19
10.2 Markup Notifications Menu Item ..............................14 16.6 The CSS Property grid-template-columns & Values .. 19
10.3 Solution Notifications Menu Item .............................14 16.7 Layout with Sidebar ................................................... 19
10.4-Footer with Multiple Columns ..................................14 16.8 Markup Layout with Sidebar ..................................... 19
10.5 Markup Footer with Multiple Columns .....................15 16.9 Solution Layout with Sidebar .................................... 19
10.6 Solution Footer with Multiple Columns.....................15 16.10 Services Grid ............................................................ 19
11. Order ................................................................................15 16.11 Solution Services Grid.............................................. 19
11.1 Responsive Navigation Bar ........................................15 16.12 CSS Solution Services Grid ....................................... 19
11.2 Markup Responsive Navigation Bar ...........................15 16.13 Better Solution Services Grid................................... 19
11.3 Solution Responsive Navigation Bar ..........................15 16.14 Quick Bites Menu .................................................... 19
11.4 Understanding Order .................................................15 16.15 Markup Quick Bites Menu ....................................... 19
12. Align Self ..........................................................................15 16.16 Solution Quick Bites Menu ...................................... 20
12.1 Solution Align Self ......................................................16 17. Grid Template Rows ........................................................ 20
12.2 Understanding Align Self ...........................................16 17.1 Sticky Footer with Grid .............................................. 20
12.3 Profile with Rating .....................................................16 17.2 Markup Sticky Footer with Grid ................................ 20
Page 2 of 32
17.3 Solution Sticky Footer with Grid ................................20 21.4 Understanding Justify Items ...................................... 24
17.4 Understanding Grid Template Rows ..........................20 21.5 Profile Card with Bio & Link Centered ....................... 24
18. Gap ...................................................................................20 21.6 Markup Profile Card with Bio & Link Centered ......... 24
18.1 Pricing Plans with Grid ...............................................20 21.7 Solution Profile Card with Bio & Link Centered ......... 24
18.2 Markup Pricing Plans with Grid .................................20 22. Align Items ....................................................................... 24
18.3 Solution Pricing Plans with Grid .................................20 22.1 Image and Text Section ............................................. 24
18.4 Understanding Column Gap ......................................20 22.2 Markup Image and Text Section ................................ 24
18.5 Blog Posts Display ......................................................21 22.3 Solution Image and Text Section ............................... 24
18.6 Markup Blog Posts Display ........................................21 22.4 Understanding Align Items in Grid ............................ 24
18.7 Responsive Solution Blog Posts Display .....................21 22.5 Featured Logos of Different Heights ......................... 25
18.8 Better Solution Blog Posts Display .............................21 22.6 Markup Featured Logos of Different Heights ............ 25
18.9 Understanding Row Gap ............................................21 22.7 Solution Featured Logos of Different Heights ........... 25
18.10 Understanding Gap ..................................................21 23. Place Items ....................................................................... 25
19. Justify Content .................................................................21 23.1 Center a div using Grid .............................................. 25
19.1 Markup Justify Content .............................................21 23.2 Markup Center a div using Grid................................. 25
19.2 Solution Justify Content .............................................21 23.3 Solution Center a div using Grid ................................ 25
19.3 Understanding Justify Content in Grid ......................21 23.4 Understanding Place Items ....................................... 25
19.4 Shopping Cart Summary ............................................22 24. Grid Column Start, End & Span ........................................ 25
19.5 Markup Shopping Cart Summary ..............................22 24.1 Horizontal Form......................................................... 25
19.6 Solution Shopping Cart Summary ..............................22 24.2 Markup Horizontal Form ........................................... 26
20.Align Content ....................................................................22 24.3 Solution Horizontal Form .......................................... 26
20.1 Profile Card with Bio & Link .......................................22 23.4 Understanding Column Start ..................................... 26
20.2 Markup Profile Card with Bio & Link .........................22 23.5 Single Price Grid Component .................................... 26
20.3 Solution Profile Card with Bio & Link .........................22 23.6 Markup Single Price Grid Component ....................... 26
20.4 Understanding Align Content in Grid ........................22 23.7 Solution Single Price Grid Component ...................... 26
20.5 Featured Logos Center of Page..................................23 23.8 Understanding Column End ...................................... 26
20.6 Markup Featured Logos Center of Page ....................23 23.9 Understanding Column Span ..................................... 26
20.7 Solution Featured Logos Center of Page ...................23 23.10 Page Layout with Grid ............................................. 27
20.8 A small variation ........................................................23 23.11 Markup Page Layout with Grid ................................ 27
20.9 Solution A small variation ..........................................23 23.12 Solution Page Layout with Grid ............................... 27
20.9 Better Solution A small variation ...............................23 25. Grid Row .......................................................................... 27
20.10 Understanding Place Content in Grid ......................23 25.1 Markup Grid Row ...................................................... 27
21. Justify Items .....................................................................23 25.2 Solution Grid Row...................................................... 27
21.1 Featured Logos of Different Widths ..........................23 25.3 Understanding Row Start and Row End .................... 27
21.2 Markup Featured Logos of Different Widths .............23 25.4 Understanding Row Span .......................................... 27
21.3 Solution Featured Logos of Different Widths ............24 25.5 Responsive Services Section ...................................... 27
Page 3 of 32
25.6 Markup Responsive Services Section ........................28 30.1 Services Section ......................................................... 32
25.7 Solution Responsive Services Section ........................28 30.2 Twitter Monthly Summary Card ................................ 32
25.8 Testimonials Grid Section ..........................................28 30.3 Social Media Dashboard ............................................ 32
25.9 Markup Testimonials Grid Section ............................28 Conclusion ............................................................................. 32
25.10 Solution Testimonials Grid Section ..........................28
26. Order ................................................................................28
26.1 Markup Order ............................................................29
26.2 Solution Order ...........................................................29
26.3 Understanding Order in Grid .....................................29
27. Advanced Grid Template Values ......................................29
27.1 Pricing Plans with Size Limits .....................................29
27.2 HTML .........................................................................29
27.3 Solution Pricing Plans with Size Limits .......................29
27.4 Understanding minmax() ...........................................29
27.5 Blog Post Page with Code Snippet .............................29
27.6 Solution Blog Post Page with Code Snippet ...............30
27.7 Responsive Grid without Media Queries ...................30
27.8 HTML Responsive Grid without Media Queries ........30
27.9 Solution Responsive Grid without Media Queries .....30
27.10 Understanding auto-fit ............................................30
27.11 How the browser calculates ....................................30
27.12 Understanding auto-fill............................................31
28. Grid Auto Flow .................................................................31
28.1 Analytics Section ........................................................31
28.2 HTML Analytics Section .............................................31
28.3 Solution Analytics Section .........................................31
28.4 Understanding Grid Auto Flow ..................................31
29. Justify Self & Align Self .....................................................31
29.1 Restaurant Cards with Labels ....................................31
29.2 Markup Restaurant Cards with Labels .......................31
29.3 Solution Restaurant Cards with Labels ......................31
29.4 Understanding Justify Self and Align Self ..................32
29.5 Caption at the Bottom of Image ................................32
29.6 Markup Caption at the Bottom of Image ..................32
29.7 Solution Caption at the Bottom of Image ..................32
30 Comprehensive Examples for Grid & Flexbox ...................32
Page 4 of 32
1. DISPLAY FLEX
2.1 TABS SPACED OUT Space before the flex items and after the flex items
are half as much as space between the items
To justify the multiple elements in a flex container
by dividing equal space between all elements in the
container.
Page 5 of 32
2.8 JUSTIFY-CONTENT: SPACE-EVENLY; 3.1 SOLUTION FLEX-WRAP
2.9 CARD WITH PREVIOUS & NEXT LINKS 3.1 UNDERSTANDING FLEX WRAP
"Prev" and "Next" buttons placed at the extreme The flex-wrap utility class makes the flex items wrap
ends of a card. This is a great example of flexbox if you run out of space. The default behavior is to
with justify-* utilities used for alignment not wrap, which is why the child items do not move
into the next row automatically.
Tailwind CSS Explanation
Class Property &
Value
flex-wrap flex-wrap: Items are wrapped
wrap; into the next line if
needed
flex- flex-wrap: Items are not wrapped
nowrap nowrap; even if it causes
Overflow
2.10 TEAM PROFILES
flex- flex-wrap: Items are wrapped in
To adjust some space around the container, with wrap- wrap- the reverse direction
flexbox and justify-around class for the container reverse reverse;
3.2 LOGOS WRAPPED
Page 6 of 32
case of the above
example)
items- align- All items are aligned to
end items: flex- the end of the container
end; (at the bottom in case of
4. ALIGN ITEMS
the above example)
4.1 ICON AND TEXT items- align- All items are positioned
baseline items: such that the base aligns
An icon and text placed next to each other vertically baseline; to the end of the
centered. container
You can see the difference between these values
below:
Page 7 of 32
5. FLEX DIRECTION
Page 8 of 32
flex-col- flex- All items are placed
reverse direction: in a single column
col-reverse; from
bottom to top
5.4 MAIN AXIS AND CROSS AXIS
When the flex direction is row, X axis is the main axis 5.8 MARKUP ALTERNATING LIST OF PROFILES
and Y axis is the cross axis. But for flex direction
column, Y axis is the main axis and X axis is the cross
axis.
Page 9 of 32
of row direction, and left over height in case of 6.7 CARD WITH HEADER & FOOTER
column direction)
Let's say we have a card of a specific height - like a
blogpost preview with title (as header), an excerpt
and a "Read more" button (as footer). The excerpt
In Tailwind CSS, we have only two utility classes might sometimes be small, but you would want your
available with respect to flex grow. button to "stick" to the bottom of the card
regardless of the height of the excerpt.
Tailwind CSS Explanation
Class Property
& Value
flex-grow flex-grow: The item grows to
1; occupy remaining
space along the
main The code is very similar to our Sticky Footer
axis example.
flex-grow- flex-grow: This is the default. 6.8 TABS HOVER EFFECT
0 0; The item occupies
only as much space Each tab has a variable width depending on the text.
as needed even if Once hovered, the active tab expands while the
more space is other two.
available
6.4 STICKY FOOTER
Page 10 of 32
6.11 MARKUP VARIABLE WIDTH RESPONSIVE should occupy; the shrink factor specifies how much
BUTTONS space should be reduced from the flex item's initial
width.
In Tailwind CSS, we have only two utility classes
available with respect to flex shrink.
Tailwind CSS Explanation
6.12 SOLUTION VARIABLE WIDTH Class Property
RESPONSIVE BUTTONS & Value
flex-shrink flex-shrink: This is the default. The
1; item shrinks along the
main axis
to fit in a single row.
7. FLEX SHRINK
flex- flex-shrink: The item does not
shrink-0 0; shrink even if it causes
the container
7.1 ITINERARY to overflow
Here's a simple itinerary component with the 7.5 PROFILE CARD – LARGE
description on left and time on right.
If you add a long description instead of small text,
the image on the left shrinks to become an oval on
smaller screens
8. FLEX BASIS
The property flex-basis is another one that can be 8.8 MARKUP BLOG POST DISPLAY
defined on the flex item along with flex-grow and
flex-shrink. this property sets the initial size of the
flex item - that is, width in case of row direction and
height in case of column direction. Along with flex-
grow and flex-shrink, this property helps decide the
size of the flex item.
8.9 SOLUTION BLOG POST DISPLAY
Page 12 of 32
Instead of using three separate utilities flex-grow-*
, flex-shrink-* and basis-* , we can make use of a
single flex-* shorthand utility.
Page 13 of 32
9.6 MARKUP IMAGE AND TEXT IN 2:1 RATIO
Page 14 of 32
width. Then using the md: prefix, 1. Set the order of
ul back to 0 2. Set the width of ul back to auto
10.5 MARKUP FOOTER WITH MULTIPLE
COLUMNS 11.3 SOLUTION RESPONSIVE NAVIGATION
BAR
10.6 SOLUTION FOOTER WITH MULTIPLE Some of the common utilities for order are here:
COLUMNS Tailwind CSS Explanation
Class Property
& Value
order-1 order: 1; Any number from 1 to
12 are available
11. ORDER similarly using order-2,
order-3
11.1 RESPONSIVE NAVIGATION BAR order- order: - The item gets placed at
first 9999; the beginning because
Assume that you have just 3 links in the navigation
the value is a large
bar and you want those links to appear in the second
negative number
row on mobile screens.
order- order: The item gets placed at
last 9999; the end because the
value is a large positive
number
order- order: 0; This is the default.
none
12. ALIGN SELF
Page 15 of 32
direction and at the
right for column
direction)
self- align-self: The item is positioned
baseline baseline; such that the base
aligns to the end of the
container (applies only
for row direction)
12.3 PROFILE WITH RATING
Page 16 of 32
13.2 MARKUP FULL PAGE TESTIMONIALS content- align- Space at the beginning,
SECTION evenly content: end and between the
space- lines are same
evenly;
14. INLINE FLEX
13.3 SOLUTION FULL PAGE TESTIMONIALS
14.1 SOCIAL MEDIA ICONS
SECTION
Let's say you want a row of rounded icons with each
icon placed at the exact center within the circle like
this.
13.4 UNDERSTANDING ALIGN CONTENT
Page 17 of 32
14.5 COMPREHENSIVE EXAMPLES FOR 16. DISPLAY GRID & GRID TEMPLATE
FLEXBOX COLUMNS
Page 18 of 32
16.5 UNDERSTANDING GRID TEMPLATE 16.9 SOLUTION LAYOUT WITH SIDEBAR
COLUMNS
Page 19 of 32
Tailwind Explanation
Class
grid-rows-1 Creates one grid row occupying full
height of the container
grid-rows-2 Creates two grid rows occupying
16.16 SOLUTION QUICK BITES MENU
50% height each
grid-rows-3 Creates three grid rows occupying
33.33% height each
17. GRID TEMPLATE ROWS 18. GAP
17.1 STICKY FOOTER WITH GRID 18.1 PRICING PLANS WITH GRID
Page 20 of 32
18.5 BLOG POSTS DISPLAY 19.1 MARKUP JUSTIFY CONTENT
In flexbox, you have the main axis and the cross axis.
Similarly, while working with grid, you have the
18.6 MARKUP BLOG POSTS DISPLAY inline axis and the block axis.
Page 21 of 32
space- much as 20.1 PROFILE CARD WITH BIO & LINK
between; possible with
first column at
the beginning
and last column
at the end (We
just saw this
in action)
justify- justify- Space before
around content: the columns
space-around; and after the
columns are
half as much as
space between 20.2 MARKUP PROFILE CARD WITH BIO &
the columns LINK
19.5 MARKUP SHOPPING CART SUMMARY The justify-* utilities control placement of columns
within container, while content-* utilities control
placement of rows within the container
Tailwind CSS Explanation
Class Property &
Value
content- align- All rows are placed at
19.6 SOLUTION SHOPPING CART SUMMARY start content: the beginning of the
flex-start; container
content- align- All rows are placed at
end content: the end of the contain
flex-end;
content- align- All rows are placed at
center content: the end
20.ALIGN CONTENT
center;
Page 22 of 32
content- align- All rows are spaced out
between content: as much as possible
space- with first row at the
between; beginning and last row
at
the end (We just saw
this in action)
content- align- Space before the rows
around content: and after the rows are
space- half as much as space 20.9 SOLUTION A SMALL VARIATION
around; between the rows
content- align- Space before, after
evenly content: and between the rows
space- are 20.9 BETTER SOLUTION A SMALL VARIATION
evenly; same
20.5 FEATURED LOGOS CENTER OF PAGE
20.10 UNDERSTANDING PLACE CONTENT IN
GRID
Page 23 of 32
21.3 SOLUTION FEATURED LOGOS OF
DIFFERENT WIDTHS
Page 24 of 32
The items-* utilities allow us to vertically align the
content within the rows, while the previous
property content-* allowed us to control spacing of
entire rows.
22.7 SOLUTION FEATURED LOGOS OF
Tailwind CSS Explanation DIFFERENT HEIGHTS
Class Property &
Value
items- align-items: All items are
stretch stretch; stretched to fill the
container 23. PLACE ITEMS
items- align-items: All items are aligned
23.1 CENTER A DIV USING GRID
center center; to the center of the
Container
items- align-items: All items are aligned
start flex-start; to the beginning of
the
container (at the top
in case of the above 23.2 MARKUP CENTER A DIV USING GRID
example)
items-end align-items: All items are aligned
flex-end; to the end of the
container (at the
bottom in case of the
23.3 SOLUTION CENTER A DIV USING GRID
above example)
items- align-items: All items are
baseline baseline; positioned such that
the base
aligns to the end of
the container (will 23.4 UNDERSTANDING PLACE ITEMS
we The place-items-* utilities allows you to align the
talk about this soon) items horizontally within columns and vertically
within rows at once. we could use the place-items-*
22.5 FEATURED LOGOS OF DIFFERENT utilities. The available utilities are similar to that of
HEIGHTS justify-items-* and items-*.
24. GRID COLUMN START, END & SPAN
Page 25 of 32
24.2 MARKUP HORIZONTAL FORM
Page 26 of 32
The col-span-* utilities can be used on a grid item to
specify how many columns to span. This is usually
used along with either col-start-* or col-end-* . But
if used alone, the default start and end lines are
considered. The available utilities in Tailwind are
col-span-1 up to col-span-12 along with a helpful
col-span-full which makes the grid item span across
all the columns in the grid.
23.10 PAGE LAYOUT WITH GRID
Page 27 of 32
25.8 TESTIMONIALS GRID SECTION
Page 28 of 32
27.2 HTML
26.1 MARKUP ORDER
Page 29 of 32
When we set max-width full and overflow-scroll to
the pre-element we expect it to occupy a maximum
of
100% width and display a horizontal scrollbar.
27.6 SOLUTION BLOG POST PAGE WITH CODE 27.8 HTML RESPONSIVE GRID WITHOUT
SNIPPET MEDIA QUERIES
Grid has a way to decide how many columns to The keyword auto-fit tells the browser to handle the
create based on the space available. But there's no number of columns and their sizes such that the
Tailwind solution for this too. We will be using elements will wrap when the width is not large
arbitrary values again. enough to fit them in without any overflow. The 1fr
in the second value of repeat ensures that in case
there's more space available
27.11 HOW THE BROWSER CALCULATES
Page 30 of 32
Tailwind CSS Property Explanation
Class & Value
Now consider a scenario where you have just one
blog post. grid-flow- grid-auto- The items get
row flow: row; placed one by
one filling one
27.12 UNDERSTANDING AUTO-FILL
row after the
auto-fit distributes the remaining space leaving no other
empty space in the row. auto-fill creates blank grid-flow-col grid-auto- The items get
columns of the same size as the items. This is very flow: column; placed one by
similar to auto-fit. You decide whether to use auto- one filling one
fit or auto-fill.
column after
28. GRID AUTO FLOW the other
Page 31 of 32
29.4 UNDERSTANDING JUSTIFY SELF AND This is a responsive services section in a grid format
ALIGN SELF from a template by Inovatik. On mobile screens, two
columns collapse into one. This a great example of
The utilities justify-self-* is used on a grid item. flexbox within a grid layout.
When the content of the item is smaller than the
width of the column, we can use this property to
control the alignment along the row axis (horizontal
direction). The utilities self-* is also used on a grid
item. When the content of the item is shorter than
the height of the row, we can use this property to
control the alignment along the block axis (vertical
direction). The available utilities are similar to that
of justify-items-* and items-*.
29.5 CAPTION AT THE BOTTOM OF IMAGE 30.2 TWITTER MONTHLY SUMMARY CARD
Here's an example where you wish to place a Look at this card with one month summary of a
caption with a transparent overlay on the image Twitter profile along with some profile info. This is a
sticking to the bottom. good example of flexbox and grid together in a
component.
CONCLUSION
Page 32 of 32