Apply correct popup css when screen has a small height