In this post we will see different CSS Flexbox properties of , their uses and how you can make your UI more flexible.
CSS Flexbox / Flexbox layout module is a useful module which helps in layout , alignment of elements in a container. The basic idea is to give the container (Flex container) the ability to alter the items (flex items) height & width accordingly.
These are the different properties of Flexbox we will be discussing in this tutorial.
In order to make your container a flex container you need to add the property
display: flex;
.container {
display: flex;
}
flex-direction: flex-direction property is used to align the children of the flex container in four different ways row, column, row-reverse, column-reverse. we will see how each of them aligns the flex items in the container. You define it by using the property flex-direction like below.
.container {
display: flex;
flex-direction: row;
}
The above gif shows how flex-direction row and column effects the flex items inside the flex container.
Below is the demonstration of remaining flex-direction properties reverse and column-reverse, either of them would just reverse the order of the flex-items in the flex-container. The below gif show how the order 1-5 is reversed to 5-1 when used flex-direction: row-reverse.
Question : Given an array of integers A, return the largest integer that only occurs once.…
Jump search algorithm is a pretty new algorithm to search for an element in a…
What is Knuth Morris Pratt or KMP algorithm ? KMP is an algorithm which is…
Binary Search is a Logarithmic search which finds the target element in a sorted array…
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X…
Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such…
This website uses cookies.