Choose a container that is at least 6 inches wide and has one or more drainage holes in the bottom.
Fill the container three-fourths of the way with lightweight potting mix.
Sow the cosmos seeds approximately 1/4 inch deep and water until the potting mix feels moderately moist.
Place the container in full sun exposure and keep the soil lightly moist until the seedlings emerge. Continue to water as necessary to keep the top 1/2 inch of soil lightly moist after all of the seedlings sprout.
Thin the seedlings when they are 4 inches tall, leaving only four to eight of the sturdiest plants in place, depending on the size of the container. Snip the seedlings off level with the growing mix instead of pulling them to prevent damage to the remaining cosmos plants.
Feed each week with balanced water-soluble fertilizer applied at one-fourth the rate suggested on the fertilizer directions.
Clip off flowers as they fade to prolong the blooming cycle. Trim off dead leaves to maintain a tidy appearance.