The peculiar magic of flexbox and auto margins

In front-end development, there are often times when I know that I don’t know something. I might know enough to know what CSS to search for, but I have absolutely no idea how to use it or what the right syntax is. Somehow, in my head, there appears to be a filing cabinet that’s entirely empty, and when I try to look something up, all I find is an almost illegible sticky note instead.

One topic like this (which is …

The post The peculiar magic of flexbox and auto margins appeared first on CSS-Tricks.

Read more

Stuff you can do with CSS pointer events

Martijn Cuppens (the same fella with the very weird div!) has some more irresistible CSS trickery. Three of the examples are about making a child element trigger an event on a parent element (almost like the magic that is :focus-within).

Here’s how I reasoned it out to myself:

  1. You know how if you display: hidden; an element, even if you display: block; a child, it doesn’t matter — it’s hidden because its parent is hidden.
  2. The same is

The post Stuff you can do with CSS pointer events appeared first on CSS-Tricks.

Read more

WordPress Tricks for Working with Records and Pages

WordPress is the most popular content management system, powering over 30 percent of the web. Over time WordPress has transformed from a simple blog to a flexible CMS which enables web users to create any type of website. Users have used WordPress to create digital experiences for ecommerce sites, personal blogs, and enterprise websites. Because …
The post WordPress Tricks for Working with Records and Pages appeared first on Torque.
Read more

Sometimes `sizes` is quite important.

Paraphrased question from email:

I just read your article Responsive Images: If you’re just changing resolutions, use srcset. In the age of “responsive websites,” srcset does not help in certain situations. For example, I have a popular products slider. On mobile, I have one image per slide where the images are 320px wide. On desktop, I have six images per slide where each is 160px wide. So the desktop images are smaller on desktop, not bigger.

How do I …

The post Sometimes `sizes` is quite important. appeared first on CSS-Tricks.

Read more

40+ Best Infographic Templates (Word, PowerPoint & Illustrator)

An infographic can give you a way to represent information in a graphic format, designed to make it more understandable, relatable, and engaging. But they can be tricky to make! We’ve gathered together a collection of stunning infographic templates, to get you started quickly (whether you’re using Word, PowerPoint, or Illustrator!) Infographics usually require icons, […]
Read more

Teaching Your Clients How to Use The Website You Built Them

I share my own thoughts on how you might go about educating someone you just built a site for. But it turns out I had a lot of fun putting together a ton of other people’s thoughts as well. I tweeted about it and got a flood of responses, so this article is an amalgamation of all that.

Direct Link to ArticlePermalink

The post Teaching Your Clients How to Use The Website You Built Them appeared first on CSS-Tricks.

Read more

Recent Videos!

I’ve recorded a decent number of videos lately, most of which are pairing with someone and digging into a topic as I glean as much information as I can! Several of these are sponsored, in that they are a part of an advertising package. Hopefully, you know me well enough that I don’t work with companies I don’t like or that sell something I don’t think you’d be good buying, but hey, heads up.

Phil Hawksworth and I do…

The post Recent Videos! appeared first on CSS-Tricks.

Read more