Flexbox CSS

Flexbox is the way in which the parts of web page elements are arranged or laid out. It facilitates to align elements and distribute space within the container (box). Flexbox makes it easier to design flexible responsive layout structure without using float or positioning.

It’s the planning and designing process from we understand how the layout of website should look like. And to make it align we can use flexbox.

display: flex; is important which tells the element with class .flex-container can use flex

We will add the style tag in the head section and the div in body tag. And our flex container with three flex items is ready to use.

We could have use containers with rows and cols but we used flexbox to get done more from it. Let’s see some more done with flexbox.

Div in vertical order
Div in horizontal and if it exceeds the limit width it will wrap the div below.
All elements aligned center

The flex container properties are:

  1. flex-direction
  2. flex-wrap
  3. flex-flow
  4. justify-content
  5. align-items
  6. align-content

Published by Manish Sharma

★ PHP Developer 14+ years of Experience ★ Mobile apps Ionic, Angular and React Native ★ Responsive websites, PWA, Chrome extensions ★ Have developed CRM, WMS for Companies ★ API integration 10+ years ★ MySQL, Mongodb ★ Podio Globiflow, Quickbooks, Mailchimp, Shopify, Quickbase ★ POWERAPPS ★ Advanced Excel & VBA ★ VBNET ★ ASPNET ★ Consultant ★ Mentor ★ Graphics ★ IOT Solutions ★ Moodle ★ Jitsi ★ Web Scraping ★ Woocommerce ★ Wordpress

Leave a comment

Design a site like this with WordPress.com
Get started