The placement is not a very easy topic in French, no matter what grammars would have you believe. If a major collegiate dictionnary-size French Grammar (Grevisse's Le Bon Usage, 14th ed.) needs 10 pages to describe it? It's not simple.
He notes that "are involved centuries of history, frequency, stylistic intentions, rhythmic balancing of the noun phrase, geographical variations..."
However, as it happens, petit is one of a set of fairly ancient, short and mostly common adjectives that are placed overwhelmingly before the noun (the most common exception is if the adjective is the head of an adjective phrase, which is always after the noun no matter the adjective, or changes of meaning, as with bon and grand). Grevisse's list (prob. not 100% complete) is:
petit, moindre, vieux, bon, meilleur, grand, joli, autre, mauvais, pire, jeune, gros, beau, demi, mi, premier, dernier (and all other numerals)
petit has a slight variation of meaning, whereas the placement before the noun is supposedly somewhat hypocoristic or further smaller than after. In practice it is somewhat rare to see petit after the noun in contemporary French (especially spoken french, baring the exceptions that apply to all of the above adjectives too): usually it is replaced by "de petite taille" or a different adjective entirely.