Grow your CSS skills. Land your dream job.

Article Archives

AnythingSlider 1.4

Since the AnythingSlider has been on GitHub, a number of people have pushed the project forward. Big props to ProLoser, Mottie, meancode, betzster, and kalasoft for committing code to make it more feature rich, smarter, and …

October 2, 2010104 comments

WebP Image Format

Google has released a new image compression format called WebP (pronounced "weppy"). It is for photographic style images (like JPG) and also lossy (like JPG). Their example gallery has side by side comparisons where the WebP version is equal to …

October 1, 2010

Drawing Table

I made a thing, in which you can use your mouse cursor to draw on a grid with different colors. You can then copy-and-paste the HTML from the design you made.


View Demo   Download Files

Features
  • Clearing the current
September 30, 201040 comments

10 Mouthwatering Tips on Can Achieve Mega Blogging Success!!

That's what I titled a quick presentation I put together for this past Barcamp Tampa Bay. I thought I'd publish the slides here.

I'll also summarize:

  • Never title things like that. It's sensationalist, poor English, and doesn't say much
September 29, 201026 comments

UI Pattern Ideas: List with Functions

Last week I asked people to participate in a group design project on a specific design pattern: a list with functions. The premise was:

The design pattern we are going to tackle is a list with functions. Think of a …

September 27, 201034 comments

Promote JS

Finding correct, current, and well written documentation on JavaScript can sometimes be rather difficult. The web has a lot of misinformation on it (can you believe it?!). This is an attempt to get Mozilla's high quality documentation at the top …

September 27, 2010

Dealing with Content Scrapers

Jeff Starr's response to my article on doing nothing about content scrapers. Among other ideas:

Sprinkling a few internal links throughout your posts benefits you in some fantastic ways: Provides links back to your site from stolen/scraped content, helps your …

September 27, 2010

What to do when you find a site scraping your content

Nothing.

Longer Version

I know it feels frustrating. Yes, they are lowlife bastards. If you launch an all out fight against them to get it taken down, you might win. You'll also leave that fight angry and bruised. Instead, you

September 23, 201070 comments

Vendor Prefix Equivalents

Ever wonder what the Gecko equivalent to WebKit's -webkit-transition-timing-function is? This chart has got you covered. But more importantly, if the other rendering engines have those properties implemented at all.…

September 23, 2010

jQuery Summit

I'm speaking at the jQuery Summit, the 2nd Annual Online, Live jQuery Conference November 16 & 17th, 2010.

If you are interested, use coupon code JQUERY2CHRIS for 20% off!…

September 22, 2010

ProCSSor

The prettiest of the CSS prettifiers. I find these things quite helpful when I'm inheriting someone else's CSS and I want to get it into the format that I like the most without doing it by hand. Actually, I usually …

September 22, 2010

WebKit Native Asynchronous Script Loading

WebKit nightlies are now supporting this. The syntax looks like this:

<script async src="myAsyncScript.js" onload="myInit()"></script> <script defer src="myDeferScript.js" onload="myInit()"></script>

Both async and defer scripts begin to download immediately without pausing the parser and both support an optional onload handler to …

September 22, 2010

Blockquote Bulge

In HTML, a block of text being quoted from elsewhere is marked up like this:

<blockquote>Hey, I'm a block of text from elsewhere.</blockquote>

In your CSS, you'll likely have special styling for these. Perhaps a bit of a background and …

September 22, 201040 comments

Group Design Project: List with Functions

Hey folks, let's design something together! I think it will be interesting and fun to try and tackle a simple design pattern as a group.

The Premise

The design pattern we are going to tackle is a list with functions

September 20, 2010248 comments

Transparent Borders with background-clip

Have you ever seen an element on a page with transparent borders? I think Facebook originally popularized it giving birth to lightbox plugins like Facebox. I don't think Facebook sports the look anymore, but it's still rather neat.

You …

September 17, 201059 comments

Tuts+ Marketplace

You already know that Envato runs marketplace sites like ThemeForest, GraphicRiver, and CodeCanyon that help designers and developers get a jumpstart on projects through buying themes, graphics, and code to help out. You also already know that Envato runs tutorial …

September 16, 201032 comments

HTML5 Pack for Illustrator CS5

Via Real World Illustrator:

You can designate certain attributes (i.e., fill, stroke, opacity) as variables right from the Appearance panel in Illustrator. When saved as SVG, developers can easily change the variable definition to "reskin" or modify the art…

September 13, 2010

Need a Font Identified?

Stephen Coles of Typographica has a new Twitter account:

Rapid, human, independent type research. Send an image, get the font name and link. Alternatives too.

WhatTheFont! is cool, but you can't beat professional human identification. Like the story of John …

September 13, 2010

Adding Stroke to Web Text

Fonts on the web are essentially vector based graphics. That's why you can display them at 12px or 120px and they remain crisp and relatively sharp-edged. Vector means that their shape is determined by points and mathematics to describe the …

September 12, 201038 comments

Box Sizing

The "box model" in CSS works like this:

width + padding + border = actual visible/rendered width of box
height + padding + border = actual visible/rendered height of box

It's a little weird, but you get used to it. …

September 10, 201059 comments

Missing Documentation for matrix3d Transforms

Documentation from Sebastian Deutsch on using -webkit-transform with matrix3d, which is rather complicated but can do cool stuff. Also, he used CoffeeScript for the demo (first I'm hearing of it) which looks kinda like SASS for JavaScript.…

September 8, 2010

Ordering CSS3 Properties

When writing CSS3 properties, the modern wisdom is to list the "real" property last and the vendor prefixes first:

.not-a-square { -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; }

Why is this method of ordering properties so commonly taught? Here …

September 7, 201049 comments

How Long Should We Ban IPs?

There are all kinds of reasons IPs get banned. A forums manager might ban an IP because the user at it is spamming. An admin of an email server might also ban IPs for spamming. A web service might ban …

September 3, 201041 comments

BonBon Buttons

These are way above and beyond the level of any other "CSS3 buttons" I've seen. Multiple backgrounds combining gradients and images, uneven border-radius, pseudo elements, HSL coloring, @font-face icons, transitions, box shadows, text shadows, hover and active states... the list …

September 2, 2010

HTML, CSS, and Javascript from the Ground Up

I've done my own The VERY Basics screencast, but this full series from Google, targeted at just-starting-out beginners, would be a good place to go directly after my intro, to take things further along. …

September 1, 2010

Digging Into WordPress, The Book, Version 3

When we first released the book Digging Into WordPress, we thought of some reasons why people might not want to buy it. A big reason is because tech books can go out of date quickly, especially when the subject …

September 1, 201044 comments

Percentage Bugs in WebKit

Using percentage values for certain things can have slightly unexpected results in WebKit based browsers. For instance, if you have a series of columns set in percentage widths with percentage padding, WebKit can calculate their sizing rather strangely.

Update: WebKit…
August 30, 201033 comments

More on CSS Selector Performance

This is a direct link to a PowerPoint file by Steve Souders (in April 2009). Of particular interest is pages 19-33 with all the information on CSS selectors. Evidence points to yes, there are efficiency differences in how you write …

August 29, 2010

CSS is to HTML as a CMS is to… HTML

From the desk of important beginner concepts:

You have a website with 100 pages on it. All 100 pages use the same style.css file. You'd like to change the background color of every single page. You make one adjustment in …

August 28, 201052 comments

WebKit HTML5 Search Inputs

One of the new types of inputs in HTML5 is search.

<input type=search name=s>

It does absolutely nothing in most browsers. It just behaves like a text input. This isn't a problem. The spec doesn't require it to do …

August 25, 201050 comments

Stylebot

Chrome users and CSS wranglers, check this out. It's an extension which adds a "css" link on the right in your URL bar. Click it to open a CSS Edit-like pane on any website where you can click elements and …

August 25, 2010

.net Magazine Awards

The Oscars of web nerdery. I'm nominated for a flatteringly high number of categories! Web personality of the year? You know it.…

August 24, 2010

New Poll: Multiple JavaScript Libraries

Have you ever tried to debug a site where a beginner web designer has loaded the page with scripts? There's a couple copies of jQuery in various versions, maybe a little Prototype or MooTools thrown in. We can laugh a …

August 24, 201054 comments

FireQuery

This is a very cool extension for Firebug (add-on for an add-on?) that expands Firebug's capabilities with jQuery. For instance, a built in jQueryify button, showing attached event handlers in the Content / DOM tree view, and highlighting all elements …

August 23, 2010

Intentional Difficulty

Here's some food for thought.

When designing something that you are reasonably certain the user is willing (or forced) to invest time in learning to use proficiently, is it beneficial to intentionally make some tasks just slightly more difficult than …

August 23, 201038 comments

Poll Results: Action Verb Clarity

The latest poll was all about picking the best sentence for a user to perform a specific action on a website. The choices are listed below, sorted from most popular to least:

  • 39% - Select a user and then click
August 22, 201015 comments

Fixing Background “Bleed”

Mike Harding with a desperately needed fix for when backgrounds "leak" out of elements with borders and border-radius.…

August 21, 2010

Forums Downtime

Quick public service announcement: The CSS-Tricks forums will be unavailable starting now as the undergo awesomeness upgrades. I'll update this post when they are back!

And they are back! Might be a bug here and there. Definitely let me know …

August 21, 201037 comments

Browser Jumping

If you asked me right now, Hey Chris, what's your favorite browser? I wouldn't know what to tell you! I've been a Firefox user primarily over the past few years, but over the last several months my allegiance is no …

August 20, 201097 comments

Blogging is Still Awesome & Yours Can Kick-Ass

That's the title of my proposed talk for SXSW. I'm rather excited about it. I'm going to be talking a lot about this blog and how I've done things over the years and what has and hasn't been successful for …

August 19, 2010

Getting Started with CakePHP: An Event Manager

The following is a guest post by r0mk1n. I was able to easily follow along and have the demo app up and running on my machine in just a few minutes. It's pretty cool how easy it has become …

August 18, 201044 comments

Touch “slide to unlock” in Mobile Safari

Evan Black took my "slide to unlock" demo and made the actual finger-slider work with Mobile Safari using JavaScript touch events. I updated the demo on this site as well, making it work both on desktop browsers and Mobile Safari …

August 17, 2010

Show Markup in CSS Comments

Let's say you are creating a CSS file for a modular bit of a webpage. Perhaps you are the type that separates your CSS files into bits like header.css, sidebar.css, footer.css, etc. I just ran across an idea I thought …

August 17, 201042 comments

Design v7

I rolled out a new design this weekend! As usual it's a bit of an aesthetic overhaul (blue!). I'm going to cover the why, the new aspects, and some of the new technology involved. RSS readers, you'll have to …

August 16, 2010232 comments

BetterSource for Safari 5

One of the major bummers about Safari is that the "View Source" view is totally lackluster. No code highlighting, no live links, no line numbers, no refresh. Boooo. The BetterSource extension solves every one of those problems. I do wish

August 15, 2010

HTML5 Templates

Papa bear: HTML5 Boilerplate
Mama bear: HTML5 Reset
Baby bear: HTML5 site template

August 14, 201029 comments

iPhone “slide to unlock” Text in WebKit/CSS3

There are a couple of WebKit specific properties that make giving text a gradient background possible:

-webkit-background-clip: text; -webkit-text-fill-color: transparent;

Those will allow the background of the parent element to become the background of the text inside. I gots to …

August 13, 201052 comments

CSS Sprites Workflow

When you are coding up a brand new site, I think this is a pretty efficient workflow for how to handle CSS Sprites.

  1. Ignore sprites entirely. Make every background image its own separate image and reference them as such
August 12, 201037 comments

Wufoo API Contest

We're giving away a friggin' Battle Axe (and $3,000) to the winner of the Wufoo API contest. Cash prizes and Wufoo accounts for life to the second and third place winners as well. Developers, you have until the end of …

August 11, 2010

Double Click in CSS

With the recent proliferation of touch devices, the web designers of the world are losing our beloved mouse pointer. There has been some interesting talk about how we essentially lose the :hover pseudo class in CSS as well as mouseenter, …

August 11, 201020 comments

*May or may not contain any actual "CSS" or "Tricks".