That comics didn't go up in price for 25 years is a bit deceptive because when they first came out in the '30s they were 64-pages of cover-to-cover content for 10¢ and when they ended they were 32-pages long with at least eight pages of advertising.
Similarly along the way there were other adjustments. Although the 32-page booklet format remained standard, story page counts fluctuated wildly. They dwindled in an effort to keep down the cover price and then expanded with price jumps. Standard length stories were as short as 17-pages and as long as 25-pages.
There was a huge packaging shift starting in the '90s in response to Image Comics which had made a huge splash with upscale printing, paper, color and content. Books at Marvel and DC emulated their titles, making stories bloodier, sexier and then using better paper and computer colors. Yes, a standard comic book in 2009 is more expensive than the one from 1990 but it's a different product in a way. The real problem for the consumer is, of course, there are no less expensive alternatives. If you want to read Amazing Spider-Man your only option is to fork over $3.99. There are no less expensive options.