z-index issues

7 views
Skip to first unread message

PLane007

unread,
Aug 4, 2009, 9:51:23 AM8/4/09
to jQuery UI Development
In developing a site that uses a number of boxes on the page to
display different content, I realise that JQuery does not address the
need to identify z-index of a div.

I guess this could be an attribute of the selected object, but it
would be extremely useful as a built-in attribute of the ui array in
many cases. It could also be a property of a selector.

This would allow the setting of the z-index of any object during many
UI methods.

Richard D. Worth

unread,
Aug 5, 2009, 7:15:18 AM8/5/09
to jquery...@googlegroups.com
Support for this is planned:


"
Planned:
* $.fn.zIndex
 - to tackle stacking issues which will become more prevalent as the UI library grows and more complex components emerge.
 - will be able to calculate true stacking level based on a target elements z-index or its parents if not set.
"

Feel free to add to that page or leave a comment (requires registration) if you have any feedback. Thanks.

- Richard

Wichert Akkerman

unread,
Aug 6, 2009, 3:44:59 AM8/6/09
to jquery...@googlegroups.com
On 2009-8-5 13:15, Richard D. Worth wrote:
> Support for this is planned:
>
> http://wiki.jqueryui.com/Core
>
> <http://wiki.jqueryui.com/Core>"
> Planned:
> * $.fn.zIndex
> - to tackle stacking issues which will become more prevalent as the UI
> library grows and more complex components emerge.
> - will be able to calculate true stacking level based on a target
> elements z-index or its parents if not set.
> "

FWIW anything that makes the z-index not predictable (and not-fixed)
scares me since it can complicate styling. Stacked panels are the only
use case I can see for a non-fixed z-index, and even those should be
fixed to be within a set range.

Wichert.

--
Wichert Akkerman <wic...@wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.

Ca-Phun Ung

unread,
Aug 6, 2009, 5:04:06 AM8/6/09
to jquery...@googlegroups.com
On Thu, Aug 6, 2009 at 3:44 PM, Wichert Akkerman <wic...@wiggy.net> wrote:

On 2009-8-5 13:15, Richard D. Worth wrote:
> Support for this is planned:
>
> http://wiki.jqueryui.com/Core
>
> <http://wiki.jqueryui.com/Core>"
> Planned:
> * $.fn.zIndex
>   - to tackle stacking issues which will become more prevalent as the UI
> library grows and more complex components emerge.
>   - will be able to calculate true stacking level based on a target
> elements z-index or its parents if not set.
> "

FWIW anything that makes the z-index not predictable (and not-fixed)
scares me since it can complicate styling. Stacked panels are the only
use case I can see for a non-fixed z-index, and even those should be
fixed to be within a set range.

Wichert.

I could see a few more use cases:

- datepickers inside dialogs
- dialogs above datepickers
- dropdown menus inside dialogs

The problem with fixed z-index is it doesn't work when one UI component is nested inside another and usually have to resort to manually changing the css to get the components to stack properly. That's usually not the expected fix for a UI component library but we have had to resort to this as a recommendation until we fix this problem. 
Reply all
Reply to author
Forward
0 new messages