Low quality cedar fence boards, such as second-growth boards from big box stores will tend to shrink more than old growth fence boards.
In this picture you can see the space between the boards as a resulte of a low quality fence board and improper installation.
First, start with a higher quality board. Don't make the mistake of buying a thinner second growth fence board from a big box store. The growth rings on those boards are spaced farther apart and will shrink more as the board dries out. Sound Cedar fence boards have a tighter growth ring that will naturally shrink less than a big box store fence board.
Secondly, let the fence boards air out and dry for a few days before you install them. At Sound Cedar Company, we store our fence boards in our covered lumber warehouse. The boards are out of the weather, and will tend to be drier by the time they arrive on your jobsite.