Sep. 6th, 2009

elfs: (Default)
I can't afford it, but in case anyone else is interested, the Half Price bookstore in Tukwila has a complete three-volume set of Knuth's The Art of Computer Programming for $75. This weekend there's a 20% off sale for labor day, so that's $60 for a set that retails for about $200.

CSS Sprites

Sep. 6th, 2009 03:08 pm
elfs: (Default)

It seems like such a stupid thing, but hey, now I know how to use CSS sprites.

Basically, it’s the same idea as a viewport slider: treat your rectangular space as a viewport onto a background image. By using the background-position attribute and the .css() control (in jQuery; there are others in other libraries), you can move the background image around. If you have two different icons of the same dimensions, you can make the DIV (or whatever rectangle you want) the same size as one of them, and concatenate all of the images together (either left/right or top/bottom). The first image will show up in the DIV. When you want the other image to show up, set the background position to the negative (left or top) of the width or height (respectively), and it’ll slide your first image out of view and show the second one.

I discovered this when I saw that Firefox was making a round-trip every time I hit the end of a paginator, because it was fetching the “enabled”/”disabled” buttons that the previous programmer had built there. A round trip for every action? My gods, you’d better save that for state control, not special effects. Anyway, it’s working now, and no more “fetches from the database” to get even a 302 (item cached) transaction.

This entry was automatically cross-posted from Elf's technical journal, ElfSternberg.com
elfs: (Default)
I went by a local "community art gallery," and as I looked around the examples I was struck by just how amateur they all were. Many of these amateurish renderings of Seattle skylines, small cafes, sailboats, and so on had actual business cards attached to them, and for sale notices, and prices upward of a thousand dollars.

One thing I noticed about every artist's presentation was that he or she had only an email address, often a gmail or hotmail account. Not one had a web-based gallery.

I said to my companion, "Here we have those who fear they're not good enough for Deviant Art selling to those too old or out of touch to have heard of it."

Profile

elfs: (Default)
Elf Sternberg

December 2025

S M T W T F S
 12345 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 4th, 2026 06:57 pm
Powered by Dreamwidth Studios