flames are in layman language light and heat enegy in acombo form due to rapid oxidation of the fuel molecules so its enegy ,not matter ,so newtons law is not applicable.flames are aresult of molecular oxidaton very energetic but not yet oxidized molecules tend to reach oxygen present zone which is a gas zone and has risen up due to heating so flames rise up...................its not a contradiction friend........................