28 Nov 2012 2:24 AM #1
Answered: Adding Absolute Overlays - zIndex Issues
I want to add an overlay e.g. a div that is positioned absolute with some message in there, but want it to follow the same 'hirachy' than normal touch elements and would like to know the proper procedure for it.
To try it out I added a DIV to the index.html with display:none and assigned all the CSS styles to it. Then in the app I change the display style to block which makes it visible (with a z-index of 1). The problem I have now is that if I call e.g. an ActionSheet or Popup that it is behind this displayed DIV. I also tried to add a zIndex of 2 to the Actionsheet but it doesn't bring it in front.
I'm sure there is a better way to this and 'hook' it into the Touch hirachy (and also probably create it programatically so that I don't have to add it to the index.html prior of actually needing it) so that I can call this absolute overlay and the actionsheet would be displayed over it with the modal mask etc.
Any help is greatly appreciated!
You will need to handle it so when you create the actionsheet then you would need to affect the div you are using.
30 Nov 2012 7:40 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
You will need to handle it so when you create the actionsheet then you would need to affect the div you are using.Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.