CSS Z-indexes higher than Floatbox's Z value

Page: 1

Author Post
Member
Registered: Apr 2009
Posts: 56
Is it possible to float a Div over a Floatbox with Z-indexing?
What Z value do the Floatie windows have? I searched Floatbox's CSS, but didn't see it. Maybe I overlooked it, but I think you are probably generating it dynamically in your Javascript.

I have set some values sky high on my Divs trying to get it to work. In the neighborhood of 1000000000

I sent you a private link by email with what I'm trying to accomplish.
« Last edit by jatss on Thu Apr 25, 2013 5:19 am. »
Administrator
Registered: Aug 2008
Posts: 3382
Floatbox's default starting z-index is 11111111 (that's 8 ones). Various box components count up by one from there.

You should be able to get your content on top of a floatbox by setting its z-index to something like 11112222.

The default zIndex value can be over-ridden by setting the zIndex option. You could use much smaller numbers than the default if you prefer.

The rather large value of 11111111 was chosen to get floatboxes above the Google translate bar, which used to use a z-index of 10000000. I checked just now and they seem to have abandoned the struggle to always be on top and are now using values a little under 1000.
Member
Registered: Apr 2009
Posts: 56
Indeed, I found the zIndex option just about when you were posting your comment.
I do apologize for missing that information before posting my question.

http://floatboxjs.com/options#general

That did the trick temporarily for the first Floatbox window that holds a Youtube video inside. But my CSS DIV floating over this Youtube video in the Floatbox window also has a fbtooltip inside that doesn't light up and it also has a Context box link inside it. If you click the Context box it opens fine but when you close it down, my underlying CSS Div is then shoved back under the initial Floatbox window that holds the Youtube video. I have assigned zIndex options to both the tooltip and context box options.

I am wondering if it needs fb.activate or something to light-up the fb content in the underlying page.

This whole thing may be too problematic to accomplish. I know you must loathe :shock: :roll: my presence in this forum by now because I end-up with some complicated scenarios that can bring headaches.

It really isn't hugely important. I have it working without Floatbox windows and I really would like to change the underlying Youtube video dynamically with afterBoxclose as outlined in my email, but I probably need to move on and not drill on this too long. A neat feature I could have, but not hugely important.

Thanks for all your help and input with this and other things in the past.

Cheerios.
Administrator
Registered: Aug 2008
Posts: 3382
I can't add much, other than to say that my experience with getting Floatbox to behave well in all browsers has taught me that z-index assignments do not guarantee how a particular browser is going to render stuff - especially in dynamically appearing and disappearing content. For example, IE 7 appears to require z-index assignment on parent elements in some circumstances before it will obey the z-index assignment on the child element. Chrome on Android sometimes simply won't display an element that has z-index assigned, but will show it just fine when the assignment is removed.

The point I'm making is that in complex setups of nested, positioned, dynamic elements you kinda have to go with whatever works and avoid whatever doesn't work, and this can be determined only by testing in a variety of browsers. CSS z-index lacks the dependability of, for example, the laws of physics.
Member
Registered: Apr 2009
Posts: 56
Thanks for the input about CSS performance in various browsers. I might add my $00.02 here and say that if IE didn't exist, 90% of web authoring issues would instantly disappear from planet earth. Will they ever embrace CSS3?

You have stellar support, a stellar product and a stellar attitude dealing with all of the questions and scenarios you've been pelted with over the years. My morning biscuits and evening cake rise perfectly inside the Floatbox oven. :D I'll figure out a more reliable route to cook this portion of my feast.

Page: 1