Articles by

Chris Coyier

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

ShopTalk Episode 18

Direct Link

With ol’ Mean Gene Crawford! We talk about crazy clients, responsive images, health, and all kinds of other shoptalk. Thanks to Mijingo for sponsoring this episode.…

Support Tabs in Textareas

Normally the tab key moves to the next focusable thing. This inserts a tab character in instead.

HTMLTextAreaElement.prototype.getCaretPosition = function () { //return the caret position of the textarea
    return this.selectionStart;
};
HTMLTextAreaElement.prototype.setCaretPosition = function (position) { //change the caret 

#111: Get Yourself Preprocessing in Just a Few Minutes

There is nothing to be afraid about in this brave new world of preprocessing. Native apps make it so easy that it should be a vital part of any modern workflow. In this video we have a simple project in …

(Updated on )

Remove LI Elements From Output of wp_nav_menu

You can remove or change the <ul> container that you get by default with wp_nav_menu (codex) through parameters, but you can’t remove the <li> elements that wrap each menu item. This is how you can actually remove them:…

Opt-in Typography

I recently heard Chris Eppstein give a talk (slides) about creating better stylesheets and using SASS to do it. There were a couple of surprising bits in there, one of which was about “opt-in typography.” The idea was …

(Updated on )

Create Data URI’s

These can be useful for embedding images into HTML/CSS/JS to save on HTTP requests, at the cost of maintainability. More information. There are online tools to do it, but if you want your own very simple utility, here’s some PHP …