fixes display issue in firefox where images extend outside the bounds of their containers