Photo gallery work and change to device width on media queries