Articles by

Chris Coyier

Founder, writer, designer, spam-deleter, email personality

Slide In Image Boxes

From the footer of the v8 design of CSS-Tricks.

View Demo

footer {
    clear:both;
    overflow:hidden;
    font-size:16px;
    line-height:1.3;
}
#footer-boxes {
    -moz-column-count:2;
    -moz-column-gap:10px;
    -webkit-column-count:2;
    -webkit-column-gap:10px;
    column-count:4;
    column-gap:10px;
}
.footer-box {
    margin:0 0 10px 0;
    display:inline-block;
    width:262px;
    height:140px;
    padding:15px;
    background:#e6e2df;
    color:#b2aaa4;
    -webkit-transition:all 

Expanding Boxes Navigation

From the v8 design of CSS-Tricks.

View Demo

nav {
    background: #444;
    border-bottom: 8px solid #E6E2DF;
    overflow: hidden;
    position: relative;
    width: 100%;
}
nav:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: white; 
}

Enable All Possible Post Formats

For your functions.php file in the theme.

add_theme_support( 'post-formats', 
	array( 
		'aside', 
		'gallery',
		'link',
		'image',
		'quote',
		'status',
		'video',
		'audio',
		'chat'
	) 
);
add_post_type_support( 'post', 'post-formats' );
add_post_type_support( 'page', 'post-formats' );
// and other custom post types if you have them

Design v9

Fun fun fun, the new site design is live!
(Updated on )

Move WordPress Admin Bar to the Bottom

Pre WordPress 3.3 only. Either add this CSS to your CSS file, add all the code to your functions.php file, or make a quick little plugin.

function fb_move_admin_bar() {
    echo '
    <style type="text/css">
    body {
    margin-top: -28px;
    padding-bottom: 28px;
    }
    
(Updated on )

The details and summary elements

Direct Link

Tom Leadbetter from HTML5 doctor shows us all about the summary and details element. I think this will be a particularly useful pair of elements, especially as browser support grows, with its baked in hide/show functionality.…

Tucked Corners

<div class="corners">
   Content
</div>
body {
  background: #e6e6e6;
}

.corners { 
  background: #f6f6f6;
  height: 700px;
  margin: 50px auto;
  max-width: 600px;
  position: relative;
  width: 80%;
  box-shadow: 0 1px 7px hsla(0, 0%, 0%, 0.2);
}

/* Corner Effect */
.corners:after,
.corners:before {
  
(Updated on )

Making Video Fluid Width

Direct Link

Me:

In a world of responsive and fluid layouts on the web one media type stands in the way of perfect harmony: video.

I wrote an article for Net Magazine where I tackle making video (from any source) work in …

Indeterminate Checkboxes

While checkboxes can only either submit their value (checked state) or not (unchecked state), they have a third visual-only state: indeterminate. This is only settable via JavaScript and does not affect the value, only the appearance. We'll cover how it works and a simple use case.
(Updated on )

New Poll: Site Title Structure

The new poll is up in the sidebar of the site. This time it’s about the structure of page titles. Literally, the <title></title> tag in the head of a site that gives the browser window/tab its title. I’m just asking …

(Updated on )

Prevent Bounce Scroll in Lion

Just make sure you zero out the margin and padding on those elements as well (normal in any reset or normalization).

html, body {
  height: 100%;
  overflow: hidden;
}