0

The CSS properties overflow-x and overflow-y should be well supported by all major browsers. So says w3. I've just made an example where we can see that they behave poorly when the visible value comes into play.

You can find the example code here on github or a working live example.

So the irregular behaviour that I see when it comes to the visible value is what I'm trying to avoid. I would like a vertical scroll (auto or scroll), and visible overflowing content horizontally. Have just tried this on Chrome and FireFox

How can I solve this, and is this the intended behaviour?

miphe
  • 1,763
  • 1
  • 20
  • 33
  • Perhaps you're looking at this the wrong way. If you want content to continue outside your div, maybe you should be using absolute positioning or a different layout structure? – CaribouCode Sep 03 '13 at 10:11
  • @Coop My requirements is a container that will create a scroll-y when needed, and let me position boxes within it (absolute). These boxes will be on the x-edge of the container, they should not be clipped. I'll try a different layout structure but I'm not sure how to get around this still. – miphe Sep 03 '13 at 14:40

1 Answers1

1

This is expected behaviour, see the w3 Spec.

What it boils down to is that in instances where it is not possible to have visible and hidden together, the visible is set to auto instead.

Kami
  • 19,134
  • 4
  • 51
  • 63
  • All right, I see I have to solve this in another way. But how can this be desired/expected behaviour, the x/y of overflow is meant to be used in combination and this means that there's really a slim way of using them. I don't see how auto -x would mean that visible -y would be impossible, I don't see the conflict. – miphe Sep 03 '13 at 11:49
  • @miphe This is how the spec has defined it, I do not know the motivation behind this behaviour. It does make it messy trying to work around it. – Kami Sep 03 '13 at 12:23