ATmega8 LED blinking project not working properly
You are overwriting your initialisation. First you set D7 as an output and all other pins on port D as a input. In your next statement you set D6 as an output and all other pins including D7 as an input. 

To fix this use this instead of both initialisations:

DDRD = 0b11000000;

you can also use this:

DDRD = 0b10000000; 
DDRD |= 0b01000000;  

if you want to setup more outputs use |= instead of =.