Category: Flexbox

Grid to Flex

Una Kravets shows how to make layouts in CSS Grid with flexbox fallbacks for browsers that don’t support those grid properties just yet. Una writes:CSS grid is AMAZING! However, if you need to support users of IE11 and below, or Edge 15 and below, grid won’t really work as you expect…This site is a solu...

A Quick Way to Remember the Difference Between `justify-content` and `align-items`

I was talking with a pal the other day and moaning about flexbox for the millionth time because I had momentarily forgotten the difference between the justify-content and align-items properties. “How do I center an element horizontally with flex again?” I wondered. Well, that was when she gave me what I think i...

CSS Grid Gotchas And Stumbling Blocks

   In March this year, CSS Grid shipped into production versions of Chrome, Firefox and Safari within weeks of each other. It has been great to see how excited people are about finally being able to use it to solve real problems.C...

Does CSS Grid Replace Flexbox?

No. Well. Mostly No. Grid is much newer than Flexbox and has a bit less browser support. That’s why it makes perfect sense if people are wondering if CSS grid is here to replace Flexbox. To put a point on it:Grid can do things Flexbox can’t do. Flexbox can do things Grid can’t do. They can work toge...

CSS Grid VS Flexbox: A Practical Comparison

Not too long ago, the layout for all HTML pages was done via tables, floats, and other CSS properties that were not well suited for styling complex web pages. Then came flexbox – a layout mode that was specifically designed for creating robust responsive pages. Flexbox made it easy to properly align elements and...

CSS Grid VS Flexbox: A Practical Comparison

We take a look at the new CSS Grid system and compare it with flexbox to see which is the better layout building tool. ...

CSS Grid VS Flexbox: A Practical Comparison

We take a look at the new CSS Grid system and compare it with flexbox to see which is the better layout building tool. ...

Squeezy Stretchy Flexbox Nav

I saw an interesting take on off-canvas navigation the other day over on The New Tropic. It wasn’t the off-canvas part so much. It was how the elements within the nav took up space. They stretched out to take up all the space, when available, but never squished too far. Those are concepts that flexbox makes prett...

Quick Tip: User Sortable Lists with Flexbox and jQuery

In this article, we’ll learn, step-by-step, how to build a simple jQuery plugin which sorts elements based on the values of their custom data attributes. If you’re curious about the end result, have a look at the corresponding CodePen demo: See the Pen Simple jQuery Plugin for Sorting Elements by SitePoint...

The Media Object, A Bunch of Ways

The Media Object pattern is: image thingy on the left, heading and text on the right. That’s what Nicole Sullivan called it and the name stuck. It’s a pretty simple pattern, but like all things web design, it can be done many ways.Bootstrap’s version Let’s take a crack at a lot of those ways....