Original Post
I'm writing a web page which I want to consist of a series of full-page-size screens which slide sideways on and off the screen. This is for simple math tests, but I've seen the same idea in online checkout systems and surveys. I've had trouble implementing it, though.
My idea was to make each screen a full-size div, get them to lay out side by side and use CSS animations to move between them. The "side by side" part turned out to be tricky, though. Lots of ways work for divs smaller than the screen, but the always want to wrap when they hit the edge of the screen. I've tried floating them all to the left and making them display:inline-block, I've tried using -webkit-box-orient:horizontal and overflow:hidden on the containing element(s), but it never works. They wind up going down the page. If I absolute-position them and use javascript, I have to move all of them (or at least the two visible at any time) at once to effect the slide. If there's a trick, I'm not getting it.
How can I make this work? How is it usually done?
Details: long story short, I'm using a mobile webkit browser embedded with a server into a mobile app. Long story: AppMobi.com
My idea was to make each screen a full-size div, get them to lay out side by side and use CSS animations to move between them. The "side by side" part turned out to be tricky, though. Lots of ways work for divs smaller than the screen, but the always want to wrap when they hit the edge of the screen. I've tried floating them all to the left and making them display:inline-block, I've tried using -webkit-box-orient:horizontal and overflow:hidden on the containing element(s), but it never works. They wind up going down the page. If I absolute-position them and use javascript, I have to move all of them (or at least the two visible at any time) at once to effect the slide. If there's a trick, I'm not getting it.
How can I make this work? How is it usually done?
Details: long story short, I'm using a mobile webkit browser embedded with a server into a mobile app. Long story: AppMobi.com