views:

152

answers:

3

While scrolling my web page a DIV which have a video is not going behind the top DIV. On my web page a top DIV,which have folloing css styling

#header{
font-size:11px;
height:25px;
position:fixed;
top:0;
width:960px;
z-index:1000;
}

Now after clearing all floated element,I added a video on a wrapper DIV like same as this way..

<div id="vedio">
<object>video code</object>
</div>

Applying CSS

#vedio{
position:relative;
text-align:center;
z-index:0;
}

After doing all stuff video is not going behind header in FireFox3.6,Google Chrome.Please Someone Help me out. Thank you

+1  A: 

In the object of video, try setting a param:

wmode = transparent
Sarfraz
No still its not working..
A: 

Which browser are you using? Internet Explorer tends to have many z-index issues with form elements, embeds, etc.

Delan Azabani
Its not working on firefox3.6,chrome
+2  A: 

Which Browser are you testing in? IE has z-index:0; issues, always start with 1 or -1 and go from there.

Edit:

Add this to your object:

<param name="wmode" value="transparent">

and this to your embed:

wmode="transparent" and remember to close your embed tag with either </embed> or seeing as you're using XHTML doctype: />. I added these in firebug and it works fine :)

<object width="606" height="385">
            <param name="movie" value="http://www.youtube.com/v/RjUIarUAioY&amp;hl=en_US&amp;fs=1&amp;color1=0x2b405b&amp;color2=0x6b8ab6"&gt;&lt;/param&gt;
            <param name="allowFullScreen" value="true"></param>
            <param name="allowscriptaccess" value="always"></param>
            <param name="wmode" value="transaprent"></param>
            <embed src="http://www.youtube.com/v/RjUIarUAioY&amp;hl=en_US&amp;fs=1&amp;color1=0x2b405b&amp;color2=0x6b8ab6"
                   type="application/x-shockwave-flash"
                   allowscriptaccess="always"
                   allowfullscreen="true"
                   width="606" height="385"
                   wmode="transparent">
            </embed>
        </object>

You also had z-index; 999; on #wp-admin-bar *, I added it to the parent; #wp-admin-bar .padder just to make sure the children would inherit the value.

Kyle Sevenoaks
Its not working on Firefox3.6,Chrome.I am not talking about IE.
Yup you can see it from here..http://afformation.rtcamp.info/
Edited answer, it works fine now :)
Kyle Sevenoaks
Hey Kyle thanks for your useful information but whatever the code given by you, I tried the same but it didn't work. you can check it from firebug.
Again The same problem..I did all the stuff but still very away from my goal..Please have a look ons again..thank you
Sorry, I made a typo in the answer, `transaprent` should be `transparent`. My bad. Edited to fix. And you still haven't closed the `embed` tag.
Kyle Sevenoaks
Thank you kyle..Now its working fine :-)
No problem, glad to help :)
Kyle Sevenoaks