By Les Christie, Staff writer, CNNMoney

NEW YORK (CNNMoney.com) — The national housing market is shrouded in uncertainty. But in California, there are glimmers of stability.

Home prices are rising in virtually every corner of the state. They’ve climbed for nine consecutive months, and in July posted a 10.4% gain year-over-year. That puts the state’s median price at $315,000 — nearly twice the national median of $183,000.

And the news is even better in coastal cities.

San Francisco posted the biggest gain of any U.S. metro over the past year, rising 14.3%. The median price there is now more than $607,000. Meanwhile, San Diego has climbed 11.2% (median price: $389,000) and Los Angeles jumped 9.2% (median price: $345,000).

Meanwhile, Florida, Arizona and Nevada — California’s erstwhile bubble-state partners — continue to struggle. So where is the Golden State’s strength coming from?

“I think it comes from the fact that prices went down so far and so quick,” said Lesley Appleton-Young, California Association of Realtors’ chief economist. “That left a lot of people here saying, ‘Wow, affordable California housing.'”

However, a quick home price rebound was delayed by the crush of foreclosures that accompanied the subprime mortgage meltdown. California real estate had become so expensive that a basic single-family home required many buyers to overextend themselves with exotic loans.

CALCULATOR: What’s the home price forecast in your city?

That is no longer the case. Most of the subprime-related distressed properties have been flushed from the system. And when a foreclosure does hit the market, it’s snapped up. The median days it took to sell a home in July was just 44 — lightening fast.

“It’s the dearth of supply for distressed properties that has put pressure on home prices,” said Appleton-Young. “More than half the homes on the market last year drew multiple offers.”

Plus, the California economy is picking up. Even in a recession, it has remained one of the world’s 10 largest economies, mainly because it is driven by every major industry — aerospace, tech, software, finance, agriculture, tourism. So as more of those industries recover and employment picks up, demand for housing will jump.

“California is a much larger, stronger and more diversified economy than the other [bubble] states,” according to Stuart Gabriel, director of the Ziman Center for Real Estate at UCLA.

Another factor that has helped lift prices is a trend toward more short sales. Fewer of the distressed properties are going all the way through the foreclosure process. “The shift to short sales in itself would increase home prices,” said Mark Goldman, who teaches real estate at San Diego State University.

That’s because short sellers usually occupy and take care of the homes until they’re sold, leaving the properties in better condition and worth more than similar foreclosed homes.

Goldman added that California markets are, generally, more constrained than any of the other bubble states. Florida and Nevada, for example, still have room to develop and grow in most areas. But the lack of developable land is especially acute in California, pushing home prices up.

Condos for less than the price of a Corolla

Finally, the California state government has not sat idle. “California provided markets with more significant price support,” he said, “That played a role in elevating prices.”

The state support came in the form of tax credits of up to $10,000 for first-time homebuyers and buyers of new homes. Some purchasers were able to combine the state credit with one from the federal government to reduce their costs by $18,000.

For home sellers in other states, what’s happening in California is encouraging. Trends often begin on the coast, so they’re hoping the recovery will roll eastward.