Back to Outdoors

How to Fence a Sloping Garden

How to Fence a Sloping Garden
DIY Guides Editorial 28 June 2026

A fence on a slope is set out differently from the first post onwards, and the decision between the two methods has to be made before any posts are bought, because it changes their length.

The two approaches

Stepped fencing keeps every panel level and drops the run down in steps at each post. The top of the fence is a staircase.

Raked fencing, also called racked or contoured, follows the ground so the top of the fence runs parallel to the slope. There are no steps.

Both are correct. Which one you can use depends mostly on the fence type.

Which the panel type allows

Ready made panels are rigid rectangles and cannot follow a slope. Any fence built from standard panels has to be stepped.

Closeboard built on site from arris rails and feather edge boards can be raked, because the rails are fixed at an angle and the boards are cut to length individually.

Some slatted and composite systems are designed to rack, with brackets that pivot. Check the specification rather than assuming.

Concrete post and panel systems are always stepped.

Setting out a stepped fence

Run a string line along the whole boundary first and work out the total fall from one end to the other.

Divide the fall by the number of panels to get an even step per panel. Even steps look deliberate; uneven ones look like a mistake.

Posts must be longer than on level ground, because each post has to carry the higher panel on one side and the lower one on the other, plus the depth in the ground.

Work out the tallest post needed at the steepest point and buy accordingly, or buy long and cut.

Start at the top of the slope and work down, which makes the steps easier to keep consistent.

Dealing with the gaps

Stepping leaves a triangular gap under each panel at the lower end. This is the main practical problem and there are three answers.

Stack gravel boards, using two or occasionally three at the low end of each panel.

Use a deeper board, 300mm rather than 150mm, cut to follow the ground.

Dig the ground level under each panel and accept a small cut and fill along the line.

Where dogs or small children are a consideration, closing these gaps properly matters more than appearance.

Setting out a raked fence

Set the posts first, all at the same height above ground, following the slope.

Fix the arris rails parallel to the ground line rather than level, using a string line between the first and last post to keep the rake constant.

Cut each feather edge board to length as you go, keeping the top edge on the string line.

The result follows the ground closely with no gaps underneath, which is why it is the traditional method on agricultural boundaries.

Slopes across the fence rather than along it

Where the ground falls away on one side of the boundary, the fence height is measured from the higher side for planning purposes, which can take an apparently modest fence over the limit.

Check this before building on a boundary where the levels differ significantly.

Retaining ground

This is the most common serious mistake on a sloping boundary.

A fence is not a retaining wall. Soil pushing against panels or gravel boards will move them, and the pressure from even a modest bank is far greater than people expect.

Where a change in level has to be held, build a proper retaining structure first and stand the fence on or behind it.

Retaining walls above about a metre, and lower ones supporting anything loaded, need design attention and may require building regulations approval.

Drainage

Water runs down a slope and collects against anything across its path.

Make sure the fence line does not dam surface water, particularly at the bottom of a garden, since standing water at the base of posts shortens their life considerably.

A shallow channel or a gap under the boards at the low point is usually enough.