overflow-y:visible not working when overflow-x:hidden is present


This question already has an answer here:


This likely has to do with the issue addressed here: CSS overflow-x: visible; and overflow-y: hidden; causing scrollbar issue

In short, when using visible for either overflow-x or overflow-y and something other than visible for the other, the visible value is interpreted as auto.

I think you can get what you want with an extra wrapping div that does the hiding but does not have the position: relative set (see fiddle):

<div style="overflow-y:visible;width:100px;height:100px;position:relative;background:#666;">
    <div style="overflow-x:hidden">
        <div style="top:20px;left:20px; width:420px;height:420px;position:absolute;background:#420;">

Need Your Help

Retract accidental checkin


You're using subversion and you accidentally checkin some code before it's ready. For example, I often: a) checkin some code, then b) edit a little, then c) hit up, enter to repeat the previous com...

How to execute JavaScript on Android?

java javascript android

I have code which uses ScriptEngineManager, ScriptEngine class for executing JavaScript code using Java. But it works fine in Java SE, and doesn't work in Android - SDK show error of missing class...