#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    8
    Rep Power
    0

    videos in css layers not obeying z-index


    I have a javascript function that maintains a central large video (which i want on top) and the 6 next most recently played videos appear as small videos also on the page, each in its own css div. the function calls a php program that outputs a div containing a video, the code shown below. The problem is that sometimes, the smaller videos are overlapping the large ones, which shouldn't be happening according to the div's z-index

    the javascript code can be found athttp://www.unc.edu/~arboone/demo.php

    from layer.php:
    (getX,getY = random coordinates)

    extract($HTTP_GET_VARS, EXTR_OVERWRITE, "");
    $horiz=getX();
    $vert=getY();
    if( IsSet($clip) ){
    if( strcmp($size,"large") == 0 ){
    print "<div style=\"position: relative; z-index: 10000; left: $horiz; top: $vert\">";
    print "<embed height=\"210\" width=\"266\" CONTROLLER=\"false\" SRC=\"/mov/";
    print $clip;
    print "\" type=\"video/quicktime\" autoplay=true loop=true controller=false cache=false scale=\"tofit\" volume=\"100%\" BGCOLOR=\"#000000\" BORDER=\"0\"></embed>";
    print "</div>";
    }
    if( strcmp($size,"small") == 0 ){
    print "<div style=\"position: relative; z-index: 0; left: $horiz; top: $vert\">";
    print "<embed height=\"105\" width=\"133\" CONTROLLER=\"false\" SRC=\"/mov/";
    print $clip;
    print "\" type=\"video/quicktime\" autoplay=true loop=true controller=false cache=false scale=\"tofit\" volume=\"0%\" BGCOLOR=\"#000000\" BORDER=\"0\"></embed>";
    print "</div>";
    }
    }
  2. #2
  3. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,268
    Rep Power
    1955
    Objects such as Realone and Quicktime players, java applets, and some widgets like the select box are OS artifacts, and are not created by the browser. Z-index does not apply.

    gary
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    8
    Rep Power
    0
    so is there any way to fake some semblance of order?
  6. #4
  7. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,268
    Rep Power
    1955
    Nope. No fix—you have to arrange things so that they don't come into conflict.

    cheers,

    gary
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.

IMN logo majestic logo threadwatch logo seochat tools logo