6R - Cards

Resource Flex Layout - 1

Mozilla Developer

The Flexible Box Module, more often known as flexbox, was created as a one-dimensional layout model and as a way to distribute space among elements in an interface while still having strong alignment capabilities. The main flexbox features are outlined in this article; the rest of these guides will go into greater detail on each of these capabilities.

Flexbox deals with layout in one dimension at a time, either as a row or a column, which is what we mean when we say it is one-dimensional. In contrast to this, the CSS Grid Layout two-dimensional approach controls both columns and rows.

Understanding how flexbox makes no assumptions about the document's authoring mode is another crucial aspect. CSS used to lean primarily toward left-to-right and horizontal writing styles. We no longer expect that a line of text will begin at the top left of a document, run toward the right, with subsequent lines appearing one under the other since modern layout methods take into account the variety of writing styles.

Resource Flex Layout - 2

CSS Tricks

A W3C Candidate Recommendation as of October 2017, the Flexbox Layout (Flexible Box) module attempts to provide a more effective approach to lay out, align, and allocate space among elements in a container, even when their size is uncertain and/or dynamic (thus the word "flex").

The basic goal of the flexible layout is to allow the container to adjust the width, height, and order of its components to best fit the area at hand (most commonly to compensate for various display devices and screen sizes). A flex container can expand contents to fill empty space or contract contents to stop overflow.

The main difference between the standard layouts (block, which is vertically based, and inline, which is horizontally based) and the flexbox layout is that the latter is direction-agnostic. Although those are effective for pages, they don't have the flexibility (pardon the pun) to support large or sophisticated applications, particularly when it comes to changing the orientation or expanding, stretching, or shrinking content.

Resource Flex Layout - 3

Free Code Camp

According to the standard, even when the viewport and the size of your elements are dynamic or unknowable, the Flexbox model offers an effective solution to layout, align, and distribute space among elements within your document. If that sounds too stiff, I sympathize with you. I'll give you a straightforward explanation of what that means shortly. You'll feel at home whether you've been writing CSS for years or are just starting started.

The direction in which the flex-items are spread out along the primary axis is determined by the Flex-direction attribute. A shortcut property called flex-flow accepts values for flex-direction and flex-wrap. The justify-content property and the align-items property are somewhat comparable. After learning about the justify-content attribute, understanding this should be simpler.

Summary

Another intriguing addition to the CSS3 specification is the flexbox paradigm, but the underlying technology is still relatively new. It may not be very useful in the public due to Firefox's problematic support and Internet Explorer's lack of compatibility until version 10 advances past the platform preview. The specification is still a draft, though. Therefore, you can actively aid in its development by trying out these new tactics right away. Although pushing the boundaries makes it difficult, the flexbox approach can be the ideal solution to set up a brand-new, experimental website or idea you've been working on.

The layout of contemporary Web pages and applications has advanced thanks to the flexbox model, which offers a number of additional options that assist us in escaping the float. It will be interesting to observe how the definition changes over time and what other page layout delights the Web design community may look forward to.