How to build a fence once the posts are set.
It's time for Johnny Cash again lol, you've got to walk the line.
Grab a measuring tape and just go along your posts to check the distance from the post top to the ground, all the way from start to finish. From that set of measurements, you will have one which is the shortest length and that is the one the fence will be aligned with. Why? If you set the fence any higher than your shortest measurement, it's going to hit the ground at that one low point and throw the continuity out, and trust me, if you do that, it sticks out like a sore thumb.
I would always aim to have my posts at 2 inches more in height than the length of the slats I was using on that section. That way I had a 2 inch gap along the bottom of the fence slats. So for example, on a fence being clad with 3ft boards or slats, I would set the posts at 38 inches. For a 4ft slat, the posts would be set at 50 inches. For a 5ft slat, it's 62 inches and for a 6ft slat, I set the posts at 74 inches.
I do that because I never wanted the slats touching the ground. Just having them up a couple of inches keeps them clean and dry, out of the dirt and that helps to make them last longer.
You might be thinking that will leave a gap under the fence, and it would, but I normally fit a base-board or kick board, some call it a skirting board along the base of the posts to counter that and it frames the base of the fence off nicely too.
For the actual fence framing, I would use two lines of rails for fences at 3 and 4ft high, and put on 3 lines for 5 and 6ft high fences. These are the classic designs and they give the fence the strength it needs. They are not hard and fast rules, you can use two lines of rails on everything if you want to, and sometimes there's a security advantage to leaving out that middle rail, because it makes the fence harder to climb from that side, but I generally opted for the added strength which three lines of fence rail gives you.
So once you have your measurement, let's say your building a 6ft fence and your posts are all set at 74 inches, subtract 6 inches which gives you 68 inches and mark each post at the base, 68 inches from the top.
Now you are ready to fit your baseboard. For that, I use 150mmx19mm (6 inch by ¾ inch) rough sawn, treated board at 12ft or 3.6m lengths, which if you kept your post spacing to 6ft or 1.8m or under, never over, then each baseboard will bridge three fence posts. Lay the first one up against the posts, mark it off at the centre of the 3rd post and trim it off. Then just nail it to the post with the top edge in-line with your pencil mark at 68 inches. The 6 inch baseboard will now be sitting in position down to the 74 inch mark. Carry on doing that until the base of the fence is boarded, and that's part 1 done.
Next up are the rails. The top and bottom rails are simple and straightforward enough. The bottom rail sits directly on top of your baseboard. The top rail sits level, or very slightly proud of the top of the posts. For the middle rail, measure down to the middle point from the post top to the top of the baseboard. Once you have worked out where the middle is, come up 2 inches, make a mark and set the top of the middle rails on that line, if that makes sense. Then what I do is set three rails on trestles, use one for marking the length by sitting it in place on the baseboard, and marking it off at the middle of the third post, and then line up all three rails on the trestle and trim them all off to length with the saw. Then it's a case of sitting the base rail on the baseboard and nailing it. The middle and top tails need to be held in place, so either there are two of you and it's easy, or if it's only you, then stick some clamps on the posts for the rails to sit on, just roughly in place until you hold them to the mark and nail them. Then just repeat the process until the end.
My final part of the framing was usually a top edge cap rail. This is just a profiled rail with the top edge trimmed into a roof profile. It's a nice finishing touch, and it frames off the top edge of the fence nicely, but the primary purpose is to add protection for the end-grain of the slats, which tuck up tight underneath. End-grain is like a bunch of drinking straws and it's a vulnerable area, so covering it or at least minimising how much end-grain is open to the elements will make the timber last longer. It's the same reason we nail caps to the tops of fence posts. It looks nicer and it protects the exposed end-grain of the posts from the weather.
Now with the framing all done, it's time to finish and clad the fence with your fence slats.
I would stack all of the slats against the fence at rough intervals ready to nail to the rails.
You can see in this example, we're all framed and we have a 12 inch trellis panel mounted above the top edge cap rail and there are very nice acorn post finials and caps on this one too. This fence is double sided, so it looks good on both sides. The slats are nailed at 1½ inch spacing on both sides, with the spaces offset to provide privacy. And here's how it looks when it's finished.
Here's another one, showing the rails framed on the posts, and then the finished fence after the slats were nailed on.