We investigate the interplay between the governing magnetic energy terms in patterned La0.7Sr0.3MnO3 (LSMO) elements by direct high-resolution x-ray magnetic microscopy as a function of temperature and geometrical parameters. We show that the magnetic configurations evolve from multidomain to flux-closure states (favored by the shape anisotropy) with decreasing element size, with a thickness-dependent crossover at the micrometer scale. The flux-closure states are stable against thermal excitations up to near the Curie temperature. Our results demonstrate control of the spin state in LSMO elements by judicious choice of the geometry, which is key for spintronics applications requiring high spin-polarizations and robust magnetic states. (C) 2011 American Institute of Physics. [doi:10.1063/1.3623480]