Use 18-gauge or 16-gauge brad nails that are long enough for the thickness of your fence pickets.