CSS-Tricks*

A Web Design Community curated by Chris Coyier

Latest Articles

Wolf in Sheep’s Clothing

3/10/2011
37 Comments

Roger Johansson has a neat quick-tip style article on centering page content both vertically and horizontally by making the html element display: table; and the body element display: table-cell; with vertical-align: middle;. See the full code to make it happen in the article.
I’m down with that. Works in all modern browsers and IE 8 plus.
I disagree on this though:

I’ve seen people saying that using these CSS properties to create “CSS tables” is no better than using

Read on! →

Quick Thoughts on Sharing Buttons

3/3/2011
100 Comments

Randomly this week, I’ve had more-than-normal number of comments from folks who ask me something like:

Went to go tweet/share a blog post of yours, and noticed you don’t have any of those on your site. Interesting, any reason why?

I do have some thoughts on that…

Read on! →

Show and Edit Style Element

3/2/2011
51 Comments

Kind of a classic little trick for ya’ll today. You know the <style></style> blocks you can put in the <head></head> of your HTML to do styling? You don’t actually have to put those in your head, they can be anywhere on the page. It’s not valid (or good practice) but it works.

Read on! →

Latest Screencast

#94: Intro to Pseudo Elements

Pseudo elements are visible elements on a web page that aren't "in the DOM" or created from HTML, but are instead inserted directly from CSS. This allows you to do lots of neat design-y things without cluttering the markup. Pseudo elements are CSS 2, so browser support for them is pretty good!

Links from Video:

Latest Snippets