Update gallery.php

Fixing a bug in the display on some browsers.