I have pages and pages in my book ("Diary of a Real Estate Rookie") about this, but the rule of thumb I give customers is:
If you are conservative and/or have kids, you can carry a mortgage amount of 2x your income.
If you are childless and/or very home-focused, you can carry a mortgage amount of 3x your income.
For most people, being in the middle at a mortgage amount of 2.5x is comfortable.
Note that I am talking "mortgage amount" not "house price."
To give you an example, if you make $100K a year, you can comfortably carry a $250K mortgage.
So if you want a $400K house, you'll have to put $150K down to make that work.
These guidelines work better than a "percentage of salary" rule, because you don't have to get into the whole before tax/after tax discussion -- and they account for the fact that people with kids may have tremendous school expenses.
author, "Diary of a Real Estate Rookie"
Insider Real Estate Tips with a Twist of Humor: http://tinyurl.com/2ag28z