Rule Number 1: Knee Above Foot (part 1 - front view)
As any of my knee rehab clients or for that matter those who have attended a run clinic with me will tell you I keep on about knee above foot. This is because it is incredibly important in firstly reducing the risk of injury, secondly in reducing pain where there is already a problem and thirdly enabling you to move better/stronger/faster.
Optimal alignment is pretty much as you see in the image to the left of me stepping up. If the knee comes towards the midline of the body and the foot remains as is or wider outside the shoulder line as is common then there is a huge amount of stress on the knee joint as gravity is pushing your body weight down through the knee joint but there is effectively nothing (bones) to hold it up, see the image below. This puts a lot of stress on the ligaments, muscles, tendons and cartilage eventually leading to injury if not corrected. Similarly if the knee travels too far forward over the foot in squating type movements firstly there is a lot of strain on the front of the knee joint and secondly you are likely to feel off balance.
Now particularly amongst many of my Osteoarthritis clients I hear things like 'my legs have always been like that', 'that's just the way they are', 'well there is nothing I can do about that'. Well in most cases yes there is!
The angles of your joints are controlled by the balance of tension within your muscles. To make it really simple imagine a tall pole standing vertically up from the ground. Without any support the slightest breeze and it would fall down. So you attach four ropes at right angles to each other to give it support these are attached to the ground they are at equal distances, they are the same length and the tension is therefore the same. (Basically how your muscles should work to support a joint - but actually much more complicated). If you then increase the tension on one rope the stresses on the pole become uneven the pole may break but what is likely to happen as the pole is not fixed is the base will eventually move at it's joint with the ground the ground wil be damaged in the process much like your cartilage.
As I mentioned previously the knee joint is a lot more complicated than this and a large number of muscles could be responsible for the imbalance. You can try to self correct but really you need the guidance of a professional to properly assess your imbalances and advise you on the most appropriate corrective exercises. Next time you go up stairs think about where your knee is in relation to your foot and your body.