The temperature of the stratosphere (7 miles to 30 miles altitude) is actually nearly constant with altitude (only rises slightly), and could be due to a slightly greater effect of the solar radiation, which is reflected less and absorbed more by the increased proportion of whiteness of visible light (wavelengths 400-700 nm) compared to the ultraviolet and infrared radiation by the gases in the ozone layer (greenhouse effect).
A complication occurs when temperature inversion occurs i.e. when cold air undercuts warm air so that air is warmer at a higher altitude even in the troposphere (google the words in bold for the causes of this).
I hope this helps, although we need assistance for more detail: calllllllliiiiiiiinnnng - geography nerds!!