<?xml version="1.0" encoding="utf-8"?>

Flexbox

Flexbox

The CSS box model has been around the longest and is widely supported by browsers. It relies on margin, borders, and padding to define spacial relationships. However, it's not the only layout model. With the rise of responsive design, another model has been rapidly gaining popularity — the CSS Flexible Box layout, or Flexbox.

Flexbox provides a more efficient way to lay out, align and distribute space among items on a page by placing them into a container. In short, Flexbox can dynamically alter its items' sizes to best fill the available space depending on the screen size.

The main downside of Flexbox lies in its newness and browser support. Older browsers don't support it as well, support it inconsistently, or not at all. Flexbox also gets complicated with more complex layouts.[1]

Improve your UX & Product skills with interactive courses that actually work