So you say, when this code is not under Custom CSS section, everything works fine? Because this is not possible that this code do such a mess. We'll be able to have a look on it only if you will send us access to the dashboard because above css can't be the reason of this behavior.
Comments
please send us url to page where you want to do this, and we'll see what css will be the best.
Thanks!