If you're having a hard time keeping your dog in your yard, there are plenty of different solutions that you can try that you may not have thought of yet. One of the first things that you need to do if you're trying to keep your dog in the yard is determine why they're trying to escape in the first place. Some dogs are more prone to escape because their instincts tell them to wander more than other dog's instincts do.
Others wander because they smell another dog that's in heat and others try to escape because they're just bored. Some of these things you can address (boredom), but others you cannot (such as another dog in heat down the road).
One serious reason your dog may be trying to escape is a lack of food or water in their yard area. Make sure this need is always fulfilled when they're left outside in the yard alone. Any dog will attempt escape if they can't access these things.
If your dog's needs are all met in the yard, they're still going to get out eventually if something catches their attention or just because they feel like being different. When this is the case, you have a few options.
If your dog is a digger, then what you can do is create an L-footer along the bottom of the fence that will stop them from being able to dig under. They can't dig through the wire that extends from the bottom of the fencing into your yard. This solution is touched on a little more on DoggyBakery.org.
Electrifying the top of the fence can stop them from attempting to climb over it, because they will get a shock when they try to do it. This is one of the cheapest solutions and comes in at just under $100 as long as your yard isn't huge.