rearranging css to fix dialogue box problems