cover-img

CSS Flexbox in pictures

11 December, 2022

3

3

0

Contributors

Flexbox is a layout module in CSS that allows for the creation of flexible and responsive layouts.
Flexbox layout provides a efficient way to distribute and align items in a container. Other than the flexbox layout model there are four other model for layouts.

Block - For sections

Inline - For texts

Table - For two dimension table

Positioned - For explicit positions of elements

Flexbox Model

FLexbox model have two main elements.

Flex Container

Flex Items
img

Flexbox Model

Flexbox Properties

Flex Container Properties

1.

Display
Container enable to flexible using the display property.

2.

Flex Direction
Define the direction of the flex items are arranged in the flex container. Flex direction has four property values.

row
img

row-reverse
img

column
img

column-reverse
img

3.

Flex Wrap
Flex wrap used to define the way items fit on to lines. It has four property values.

wrap
img

nowrap
img

wrap-reverse
img

5.

Justify Content
Defines the alignment of items in the main axis.

center
img

flex-start
img

flex-end
img

space-between
img

space-around
img

space-evenly
img

6.

Align Items
Defines the alignment of items in the cross axis.

stretch
img

flex-start
img

flex-end
img

center
img

baseline
img

Flex Item Properties

1.

Order
Define the order of the items
img

2.

Flex grow
Define ability of item to grow. In following image shows child has a value 2 take twice of the image and other items get equally one.
img

css

responsive

flexbox

develevate

3

3

0

css

responsive

flexbox

develevate

Senali
Fullstack developer | Open source contributor | Hackathon winner

More Articles

Showwcase is a professional tech network with over 0 users from over 150 countries. We assist tech professionals in showcasing their unique skills through dedicated profiles and connect them with top global companies for career opportunities.

© Copyright 2024. Showcase Creators Inc. All rights reserved.