Similar to being flat, spreading cookies are a result of your fat source being too warm.  That is why chilling your dough to prevent flat cookies is a step you can't skip! Another reason they might be spreading or flat is because your baking soda or baking powder might be expired. Finally, over-mixing is another reason why they turn out flat.