How does the camera actually focus?
The camera uses a contrast detection system. It tries to find the focus setting which gives the highest contrast within the focusing area. It looks for vertical contrast. If you have a subject with strongly defined vertical lines, then it will find a good focus. If, however, there are only horizontal lines, or no areas of contrast at all, then it will find it difficult to focus. If you have only horizontal contrast, then rotate the camera to focus, then rotate it back to take the picture.