Skip to navigation Skip to content

Results for “coding”

Setting aspect ratios on responsive objects

Responsive design not only caused designers and developers to rethink their entire design process, it caused numerous little head-scratchers along the way.

One problem is how to maintain an an exact aspect ratio on a DOM object on page resize. It’s easy if it contains a presized object, hard if it does not. Adjusting top or bottom padding was always a favorite technique.

Recently I needed a square figure wrapper to contain an image of undetermined size and aspect ratio. The image could be either tall or wide. Despite this, the image would need to center and fill out... More

Flipping the script

I have a particular methodology that I use to write all my JavaScript.

First, I decide to add some sort of gratuitous, showy, processor-hogging, performance sapping JavaScript animation to my site. Then I spend two weeks writing code that is a horrible disorganized mess that is about 90 percent functional but completely breaks every time I try to fix it.

Then throw it out and rewrite it all in about three hours.

Which brings me to the latest addition to this site. I’ve added a scroll progress meter to the top menu bar. I even consulted for several months with... More