there are rules for cribs ....
There are safety rules for the spacing of spindles and slats on cribs. You need to check out the spacing and the gap dimension on commercially made... read US GOVT approved cribs. There is a choking hazard with too much space between the slats and little ones have died from getting their heads stuck.
The trick for equally dividing a distance with a ruler is shown here. Choose the number on the ruler that divides easily into your desired spacing:
The answer to your question will only be as detailed and specific as the question is detailed and specific. Good questions also include a sketch or a photo that illustrates your issue. (:< D)