Grow your CSS skills. Land your dream job.

Article Archives

Five Questions with Jonathan Longnecker

I met Jonathan at a conference last year. Jonathan was giving a presentation about ExpressionEngine and how good it is for designers. He gave me a good natured ribbing about my use of WordPress. Read the interview below where I …

February 12, 201013 comments

The Great CSS Off & Giveaway

Alrighty folks, here's the deal. I have a whole bunch of stuff I want to give away. Mostly books on web design and development. I've been deep in thought trying to figure out the best way to give them all …

February 10, 2010250 comments

jQuery MagicLine Navigation

These "sliding" style navigation bars have been around a while, I just thought I'd take a crack at doing it myself as the opportunity came up recently. Turns out it's really pretty darn easy. I put two examples together for …

February 9, 2010114 comments

How nth-child Works

There is a CSS selector, really a pseudo-selector, called nth-child. Here is an example of using it:

ul li:nth-child(3n+3) { color: #ccc; }

What the above CSS does, is select every third list item inside unordered lists. That is, the …

February 8, 201054 comments

Threadsy Invites / Haiti Poster Project

Two things today.

First, have you guys heard of Threadsy? I hadn't, but apparently they got 2nd place at TechCrunch 50, which is pretty great. It's a web application that combines several of your online "input streams" (e.g. Email, …

February 5, 201026 comments

Link Underlines Grow to Backgrounds on Hover

A reader recently emailed in asking if I knew a way to have links be underlined, and then have the underline grow upwards on hover and turn into a background/highlight effect. I ended up trying three different things, with varying levels of success.
February 4, 201050 comments

Free Template: DocTemplate

Totally free template for ya'll today. It is fully of AJAX navigation goodness, so subpages load dynamically with no page reload. If you don't like that part (for example, you are trying to put JavaScript demos on the subpages and they won't load that way) just remove the JavaScript files from the header and it will revert to regular nav. Enjoy!
February 2, 201069 comments

Make All Links Feel Subtly More Button-Like

On this current design of CSS-Tricks, you may have noticed how all links bump themselves down one pixel as you click them. I started noticing this effect on sites of luminaries like Tim Van Damme and Andy Clarke, so …

February 1, 201058 comments

Thank You (2009 Edition)

Before January slips away from me, I want to get my annual Thank You post out! Thanks to TheDoc (our resident prolific forums guru) for reminding me.

Milestones

Snippets Launched

The biggest addition to this site in 2009 was the …

January 30, 201047 comments

Designers These Days…

... have a good design sense and understand the fundamentals / design principals.
... know all the major design software including the entire Adobe Creative Suite.
... have some basic video editing skills.
... know HTML, CSS, and JavaScript.
... …

January 29, 2010186 comments

If it’s not one thing, it’s another.

This year on 24 Ways, Jeffrey Zeldman wrote an article about the rending problems of "real fonts" on the web. The one line summary: different browsers and different platforms do "hinting" differently which can be bad news. Of course, …

January 28, 201014 comments

Redesigning an “Edit Product” Page

I decided that in 2010, I was going to design more things. I didn't do as much just straight up designing of things in 2009. So rather than wait around for opportunities to come to me, I am going to …

January 27, 201041 comments

Updated Bookshelf

In an effort to provide a permanent resource to the question "are there any books you recommend?", I created the CSS-Tricks Bookshelf. It had slowly gone out of date, so now I've bought it back up to date …

January 26, 201026 comments

IE Background RGB Bug

Using RGBa for progressive enhancement is getting more and more popular, which is awesome. Even nearly a year ago it was pretty much ready to rock. A great way to handle the progressive enhancement part is just to declare …

January 25, 201041 comments

New Poll: Tag/Punctuation Placement

There is probably a right and wrong answer for this, so if that emerges, I'll update this article and mention it in the results. Regardless, I don't think it's obvious, so this poll should be answered on what you currently …

January 21, 201096 comments

How To Create an IE-Only Stylesheet

This article has been updated from an older version (originally Sept 24, 2007). I just wanted to expand it and make it more clear.

If you read this blog, there is a 99% chance you've had a hair-pulling experience with …

January 20, 2010122 comments

Poll Results: Hyphens, Underscores, or camelCase?

My intention with this poll was to be kinda vague, so that people would respond about what they like the best instead of thinking of one particular instance of usage. Usage could be where ever you need to manually name …

January 19, 201036 comments

Increase Traffic by Reducing Traffic

What? Yeah sorry, dumb title.

Here's my point: when websites offer awesome things that seemingly would reduce the amount of traffic they get, the cumulative effect is increasing traffic.

APIs

Flickr offers robust APIs. With them, you can upload, download, …

January 18, 201043 comments

Rational Z-Index Values

A reader named Arjan recently emailed me telling me about a website that The Printliminator didn't work on. They had traced it back to the fact that the site used a bunch of "overlays" with ridiculously high values for z-index. …

January 17, 201054 comments

Background Desires

The background property is a major player in what makes the awesome CSS designs of today possible. There are just a few properties that make it up: background-color, background-image, background-position, background-repeat, and background-attachment. Very simple, very powerful. I have a …

January 15, 201036 comments

Curating Comments Threads

Long comment threads on blog posts are a mixed blessing. It is great to have stirred up such great community discussion. But anything beyond, say, 20 comments is beginning to get beyond what anyone is willing to actually read. What …

January 13, 201075 comments

Random Ad Positions

If you have multiple display ads of the same size in a block on your site, a good thing to do is randomize their position in the block. It's more fair to the advertisers and the different layouts reduce ad …

January 8, 201034 comments

Less Ridiculous Standard Ad Sizes

I recently said that I thought the current "standard" pixel dimensions for ads are ridiculous. 728x90? 88 x 31? Wha? I have a new idea: ad sizes that make sense.

Let's start with a basic building block. 125x125 is very …

January 7, 201097 comments

Filtering Blocks v2

This is an update to the first version of filtering blocks I did a while back. The idea is that you have a long list or large set of "blocks" on the page. Each block belongs to a certain group. …

January 6, 201031 comments

Cross Domain iframe Resizing

<iframe>'s which display content from different domains have security measures in place to prevent all sorts of stuff. For example, you can't have JavaScript access anything inside it. It can be very frustrating, for example, if you just want to …

January 5, 201027 comments

On Web Advertising

On this week's screencast I talk about online advertising. What it is, how it works, and mostly, my opinions about it. I thought I'd recap here and touch on some things I forgot about.

Content Websites vs. Product/Service Websites

There …

January 4, 201040 comments

One Page Résumé Site

A friend of mine recently sent me her résumé to look over. I'm definitely not a professional job hunter but I think in these situations any extra set of eyes can help fine tune the final product. As it was, …

December 31, 200976 comments

Seeing The Details

When a great musician hears a great song, what do they hear? I am not a great musician so I can only speculate. I would guess that they listen for the emotion behind the song. Great songs are great because …

December 30, 200928 comments

Digging Into WordPress – in Print!

The print version of Digging Into WordPress the book is now available here. It's been an awesome journey, taking this from idea to final product and having 100% control over everything. That is a story for another post, for …

December 29, 200947 comments

Automatic IMDb / Netflix / Amazon Movie Links

In this article we'll look at a way to automatically create and insert links that link out to the popular movie-based sites (or sections) Netflix, Amazon, and IMBb. We'll use jQuery JavaScript for this, so that this happens on the fly using soley the name of the movie, reducing what would be a tedious chore of manually collecting all these links into just a few lines of code.
December 28, 200918 comments

Multi-product Quantity-based Order Form

The point of this form is that users enter quantities for different products and the math is done automatically updating all the different totals: quantity total, subtotal, shipping total, and final total. Monetary formatting is kept intact with some helper functions. Foxycart is integrated to show how it might work in the "real" world.
December 23, 200918 comments

Design v6

I've been tinkering with this redesign maybe a month or two, and decided to push it out last night. I had been using it myself thanks to the Theme Switch plugin, but there was a few things I had to actually go live before I could change, so I just did it. As usual, it's not an absolute overhaul, more of a refresher.
December 22, 2009180 comments

Aborting Links, Cross Browser Comparisons

The situation: you click down on a link and you suddenly realize you didn't want to click that link. So before you release the mouse button, you move the cursor away from the link.

This is what I am calling …

December 21, 200924 comments

Don’t Use Black for Shadows

That is, "don't use black for shadows over colored backgrounds." This is because shadows in real life are not black. They are darkened versions of whatever they sit on top of, because there is less light. Or, am I whack?
December 18, 200976 comments

Musings on Paginating Chronological Content

Pagination is a ubiquitous design pattern on the web. Thanks, in part, to huge sites like Google using it. Pagination is a metaphor. It is a way to break up content onto multiple pages when putting it all on one would be to overwhelming or resource intensive. Google's approach has defined how we think about pagination, and thus what we feel to be intuitive. But to what end?
December 17, 200987 comments

Elsewhere

Some links to stuff I have been doing outside of CSS-Tricks. Jason published a "part 9" of the Building a Web App from Scratch series. I wrote an article on my personal blog on using Safari for a week. The Digging Into WordPress books are at the printer!
December 15, 20096 comments

Fully Executing jQuery Animations Without Queuing

It is pretty common when using jQuery's .animate() function that it is triggered by a mouseEnter or hover event. This means that we need account for those events being triggered multiple times. This article goes through my journey of trying to find a good solution for this, and ultimately a plugin that does the job rather nicely.
December 14, 200939 comments

New Poll: Hyphens, Underscores, or camelCase?

I'm talking about anywhere you need to write multiple words, but can't use spaces. For example: CSS classes and id's, programming language variables and function names, website usernames or passwords, etc.

You can vote in the poll in the sidebar. …

December 13, 2009156 comments

Poll Results: CSS Formatting

The poll actually had a variety of options, including different options for Multi and Single line formatting. But what I found most interesting is the sheer domination of Multi line:

For the record, I'm a single line guy. Most multi-line …

December 11, 200982 comments

Silhouette Fadeins

Some friends of mine's band recently went through a small member lineup change. They needed to replace the photo on their homepage. I thought it might be fun to do something slightly interactive there. We went with silhouettes of the …

December 9, 200979 comments

Editable/Printable Invoice, Version 2

I knew as soon as I released the previous version of the Editable Invoice that using some JavaScript to spiff it up would be a good idea. I was thinking of doing a screencast on it perhaps, but then multiple …

December 8, 200950 comments

Making Money with Web Skills

For the last two years, I've done a virtual guest lecture to Jeffrey Brown's class in Maryland. Both times, I talked about how the skills they are developing with the web don't lock them into any one particular career. There …

December 6, 200945 comments

Source Code for Colored Lists + Book Winners

We are happy to let you know that we packaged up the source code and the Photoshop mockups from Colored Lists and are offering them up for your downloading pleasure. We made up a little homepage for the series, so …

December 4, 200912 comments

CSS Variables with PHP

When people are asked about features they would like to CSS, "variables" always seems to come up. Whether or not this is a good idea is still something I personally haven't decided on, but I'd lean toward yes. Regardless, using …

December 3, 200980 comments

Autofilling Wufoo Form Fields & Other Tricks

It's been a while since I've professed my love for Wufoo. Oh, sweet Wufoo. Thy delicious interface makes form building easy, nay, a pleasure. OK, a poet I am not. A solutions wrangler I am.

In creating a form …

December 2, 200924 comments

Make an Editable/Printable HTML Invoice

I always like how in FreshBooks to edit invoices you literally just click and interact directly with a web page that looks like an invoice. I got to thinking it would be a kinda cool idea to create an editable …

December 1, 200960 comments

Scroll/Follow Sidebar, Multiple Techniques

Really simple concept today folks! A sidebar that "follows" as you scroll down a page. There are a number of ways to go about it. We'll cover two: CSS and JavaScript (jQuery) with a bonus CSS trick.

View Demo   …

November 30, 200940 comments

Creating a Web App from Scratch – Part 8 of 8: Security & The Future

Hooray we made it! First of all, thanks for following along this whole journey. You can go check out the real live app for yourselves:

http://coloredlists.com

Below we're going to wrap up a few things by talking about some of …

November 27, 2009220 comments

Creating a Web App from Scratch – Part 6 of 8: Adding AJAX Interactivity

Our developer has already done a massive amount of work turning this idea into a real application. Now let's make some more for him! The most important part of this app is creating and managing your list. We decided from …

November 25, 200913 comments

Creating a Web App from Scratch – Part 4 of 8: HTML & CSS

It's time to get our hands dirty with some markup!

We know we have a couple different pages to deal with here. The main page of course, which acts as both our list page and sales page depending on login …

November 24, 200928 comments

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