Screw two of your 4-foot-long 2-by-4-inch boards loosely to the top of the other two boards to form a frame. Use a drill to make pilot holes to help prevent the wood from splitting. Assemble the square frame so that the tall edge of the boards is facing up when the frame is laid flat.
Use an L-square to make sure that each corner of the frame is at a 90-degree angle. Tighten down the screws.
Lay the frame on the ground and place the 4-foot-long, 2-by-4-inch piece of lumber on the back of the frame. Carefully mark the angles on the ends of the board that allow the board to be screwed to the frame as a diagonal brace.
Cut the end angles on the 4-foot-long board with a miter box or miter saw.
Screw the diagonal to the inside of the frame. Drill pilot holes to help reduce the risk of wood splits.
Center one of your 4-foot-long fence boards on the frame. Align one edge with the edge of the frame. Because you ensured that the frame was square, this edge is a good guide for the starting fence board.
Screw the fence board to the frame. Drill pilot holes before inserting the screws to prevent wood splits.
Continue installing fence boards across the frame until the frame is covered.
Cut the last board down in width if it hangs over the other end of the frame. Whether you must do this, and how much you may need to trim off the board, depends on the width of your fence boards.