I know I'm ressurecting a long dead question, but I had the same question and I wanted to add something. Please don't ban me for this, I felt it was important enough to justify this answer, I'll delete if required. @Joseph Silber is wrong, coding all the possibilities actually is a viable way to do this. The reason is because there actually aren't infinite possibilities. Well, technically there are, but 99% of your visitors will be using a standard resolution. This is doubly true for mobile (the main reason for responsive web design) because most mobile OSes run apps full screen with no window resizing.
Also, height is pretty much irrelevant because of the scrollbar (to a point, I would immediately leave a web page that was more than 4 or 5 feet long, but this mostly holds true), so you only need to worry about width. And really, the only widths you need to code for are the following: 240, 320, 480 (for older iThings), 640, 800, 1024, 1280, 1440, 1600, 1920, 2048, 2560. Don't even bother for 4k, it will bloat your images too much and the 2560 size stretched to 100% width looks just fine on a 4k monitor (I've tested this). Also, don't bother with 720 (720x480) as the previous poster suggested. Its a resolution used almost exclusively by digital cameras, and even then its very uncommon.
If someone is using an exotic resolution, nearly any renderer made in the past 15 years will round down, so if someone's screen width is, say. 1100, its going to load the 1024 CSS rule, your site shouldn't break. This renders accounting for exotic resolutions by trying to create a responsive rule unnecessary, and the idea that you need to code for every possible setup pixel by pixel is ridiculous, unless someone's using a web browser so outdated that your site probably wouldn't load at all anyway.
widthinems thing goes the other way around. It's thewidththat depends on thefont-size. @JosephSilber That's exactly what I thought. – Ana Jan 21 '13 at 2:24