DEV Community

CSS Flex Guides

Flexbox and flex properties are incredibly useful and can be mixed with other CSS layout approaches!

This is a collection of top and trending guides written by the community on subjects related to CSS Flex concepts. For all things CSS, check out the CSS tag! Please contribute more posts like this to help your fellow developer in need.

An infinite/circular carousel with css flex and little JS

Lately I have been playing a lot with css (and finally yes I get to do what I love) I was actually thinking of several applications of flex order property. Last usecase I found helps to solve a small accessibility issue in signup/NDA forms head here to see what it was.

Building a dashboard UI using grid and flex-box

Please refer the links below for a complete overview of features/properties of both grid and flex box:

Pure CSS Flex Box Responsive Design - No Media Queries

Next we can make our viewport class responsive with the following class. .viewport is now a Flex Box container!

CSS flex-box Guide for anyone

To understand how flex works and the properties associated with it we need to first understand the concept of axis.

CSS Flex box : everything you need to know about flex box

Hey, welcome. If you are here, you must have heard about flex box in CSS or you already know what is flex box. But, What exactly Flex box is ?

CSS Loading Animation - Ripple Effect in Mosaic (keyframes, flex box)

Today let's work with CSS animations, delays and flex box in order to create a nice little ripple effect on a colored mosaic.

CSS flexbox: how to use flex-shrink and flex-grow for responsive layout

It took me a while to figure out flexbox, espcially flex-shrink and flex-grow.

Here is a cheat sheet that I made based on developing experience, and I hope it will help you.

The Ultimate Display Flex ⚡.

Display flex is a CSS display property used to arrange elements in a particular container. It literally lives up to it's name allowing elements of a particular container (parent element) to flex. Before the advent of display flex front-end developers created web layout through the use of float property some even went as far as using html tables to arrange elements with rows and columns on the web page. This made front-end development at that time very difficult, but then CSS3 came out with a new display property called display flex which made building layouts easier...

Do You Spam Flex Box Also?

This is not a post about how to use flex box. For this aim, you may find the following posts (app) interesting:

Overflow Wrap in a Flex container

In this blog, we'll look at a very specific thing i.e. the use of overflow-wrap property inside a flex container. overflow-wrap is a very handy CSS property and I've used it in almost all of the projects that I've worked in.

New Project - CSS Flex Generator

I created a CSS Flex generator which helps users understand flex containers better. This is the link - CSS Flex Generator

CSS Flex Explained in 1 Animation

There is a lot you can learn about flex just from watching this animation. I think spacing items is at the core of Flex functionality. So I made this animation to demonstrate that.

Making Layouts Easy With CSS Flexbox: Flex-Item Properties

In the previous post, I covered all the properties that are applied to the parent flex container item.

Building a Flex Layout from scratch to Fit All Projects

With the increasing trend about grid and flex loads of developers and companies stopped using frameworks and started using this built-in CSS properties to shape their layouts. Sometimes combined and sometimes the bet is an all-in for one of this two.

Advanced CSS: Quantity Queries + Creating a Fluid Responsive Grid with Flex + Zero Media Queries

At first sight this might seem like a trivial problem to solve. A few flex-properties should solve most of this, but there's a problem here: If there are four items, they should all render on the same row, however if the user adds one more, the first three items should display on one row, then the next two should be rendered on their own row. How can this possibly be done with no JS?

Everything you need to know about flex box. Make awesome websites

No matter you are a beginner or pro. If you want to make extraordinary Web sites. If you want make amazing UI/UX, then you must read this advance CSS series article. In this article, we’ll talk about CSS flex box. Flex box is important in CSS and with this we can make any sort of web site easily. If you follow this CSS series believe me you’ll be able to make amazing websites as I do. In today’s article, you will learn about flex box, and its use cases, and some of its properties. So let's quickly jump into it.

Flexbox: flex-grow, flex-shrink y flex-basis 🎨

Flexbox ya es un estándar al momento de posicionar elementos y maquetar nuestras app y páginas web, como bien sabes existen propiedades flex que se pueden aplicar a nuestro flex-container como bien hay otras que se aplican a los flex-items.

Making Layouts Easy With CSS Flexbox: Flex-Container Properties

Image Explaining Flex Layout and Basic Terms The image above explains flex layout and basic terminologies.

CSS Flex-Box Most Used Properties

-> Flexbox is a one-dimensional layout model which means that you can control only one direction at a single time either row or column. This allows you to align the flex items easily in different styles and layouts.

CSS Gap creates a bright future for margins in Flex as well as Grid

** Quick warning: Gap for Flex currently only works in Firefox **

Intro to CSS Flexbox - Flex Direction

Flex direction establishes the axis all content within the parent flex container displays itself on.

Mastering on flex-basis behaviour

Hey Gang, Feel lucky to see you again. when start to learning on flexbox, feel like the least well-explained property in Flexbox tutorials. start to getting confused😥 like what exactly flex-basis behavior?? what's the difference between width and flex-basis?? etc.,

How to position items within a container using Flex Box ?

justify-content: flex-start;


Master Flexbox Scaling by Understanding flex-grow, flex-shrink, and flex-basis

Inspired by an article why flex-grow is weird, I've developed a small tool (Codesandbox) to explore how different properties of flex items work separately or in combination. You can reproduce all examples of this article with my tool. I hope you find it useful.

Evergreen CSS Flex Layouts With Live Demos

I have to deal with CSS Flex layouts very often but noticed building them from scratch every time. That's irritating.

CSS Flexbox: flex-direction

Before we talk about the values of flex-direction, you can check the playground that I provide below.

The screenshots that I attached in each value's explanation are based on this playground.

Happy CSS Flex coding!