Properly setting the posts is the first step in establishing the structural base of a fence. This base should therefore be straight. There are methods to follow that allow you to set posts in a straight line each time you build a fence. You can use the same basic procedure regardless of the type of material, whether wood or metal, that you use to build the fence.
Measure for the perimeter of the fence, using a tape measure. Drive stakes into the ground at the fence corner, fence end and gate points, where what are called the terminal posts will be placed. Drive the stakes using a sledgehammer. Run a strong line of string tightly from one corner stake to the next, outlining the fence area.
Dig the postholes at the points you have staked, using a posthole digger. Add the proper amount of water to ready-mix concrete, and pour the concrete into the postholes after setting the posts. Or, fill the holes with other materials such as crushed gravel, sand or soil, depending on the fence type and local restrictions. Set the posts in the centre of the holes. Place a carpenter's level against each post to make certain each post is straight and level. If you used concrete, allow it 24 hours to harden.
Stretch a line of string tightly between each terminal post, positioned on the outside face of the posts. Measure the distance between terminal posts, using a tape measure. Use this distance to refer to a line spacing chart, and determine the correct and exact distance to set between each of the line posts, the posts between the terminal posts.
Measure for the location of each line posthole, using the tape measure. The centre of the line posts should line up with the centre of the terminal posts, with the outside face of the line posts about 1/4 inch inside the string. Dig the line postholes, using the posthole digger. Install the line posts directly in the centre of the holes. Do not position the line posts directly touching the string, so the string will not be pushed out.