Thursday, November 11, 2010

Altering CSS for every nth element of a class

I wanted to improve on my previous jquery fix to remove the left padding for the 4th floating div.widget on the Rabbit Software homepage. If I add more widgets, the rows won't align correctly unless I can remove the padding from every 4th one. Because of the fixed width template and fixed width of the widgets, there are always 3 widgets per row.

The index of widgets counts up from 0, so I needed to fix every child whose index is a multiple of 3.

Even floated div columns: equalHeights

When you are floating a bunch of divs inside a container, it is a design problem when the divs are of different heights depending on their content, because they tend to wrap funky. One can, by brute force, make them all the same height, but that approach is fragile and can create problems with the content contained in each div. (Why is there a flower photo? Just because it looks nice.)

A better approach would be to measure the tallest div and force that height on all the remaining divs. Alas, although there exist some CSS methods for doing this, they're not adequately cross-browser compatible, so a javascript method is the only effective approach.

I found a very nice jquery plugin called equalHeights, and implemented it in the SimpleFolio theme for rabbitsoftware. Thank you again, Filament Group, a great resource for JQuery plugins.

Sunday, November 7, 2010

Rip an Audiobook CD to an IPod

I have been spending time with audiobooks lately. Managing and navigating audio book CDs, which can have up to 99 tracks per disc, can be a nightmare on the IPod unless you build playlists before syncing.

This CNet post, How to rip an audiobook CD to an iPod, was very helpful.

Join tracks in ITunes

If you imported an audiobook CD to ITunes but didn't join the tracks when you imported, there is a solution.

Doug's Applescripts for ITunes will allow you to select a set of tracks (AAC or MP3) and join them into a single file. This is a great help for audiobooks, because there's no reason to have 99 tracks in an audio book. If you have several audiobooks in this condition, they're a holy mess to navigate in your IPod: 26 CDs of 99 tracks each? Try scrolling to the end or beginning of that list and see what I mean. This is a nightmare because my IPod Nano doesn't have a convenient album cover style browse feature for books.