Video Not Centering

Discussion in 'CSS' started by Pudge1, Sep 25, 2011.

  1. #1
    http://007vg.com/n64/goldeneye/walkthrough/index.php

    When you play one of the videos it pops up, the background turns black and you can't interact with anything behind the video. You press escape and it all goes back to normal. Everything the content that comes up (which includes the escape instruction box below) is slightly to the right instead of centered like it should be. I've tried setting the div width to auto and 100% that didn't work, I also tried using position: absolute; left: auto; right: auto; and without the left; and right; but nothing is working. How do I center it so it will be centered in all screen resolutions?

    
    <div style="z-index: 51; width: 100%; height: auto; display: none; position: absolute; top: 25px; left: auto; right: auto;" id="dam">
    <div style="margin-left: auto; margin-right: auto;"><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/puExjd-jh-8?fs=1&amp;hl=en_US&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/puExjd-jh-8?fs=1&amp;hl=en_US&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></div><br />
    <div align="center"><div style="border:2px solid #000; background-color:#3B3B3B; width: 35%;"><b style="color:#FFF; font-size: 22px;">Press ESC To Exit At Any Time</b></div></div>
    </div>
    
    Code (markup):
    (display: none changes when you select the video you want to watch)
     
    Solved! View solution.
    Pudge1, Sep 25, 2011 IP
  2. #2
    Try applying left: 0px; top: 0px; on the DIV that has id="dam"
     
    czent, Sep 26, 2011 IP
  3. Pudge1

    Pudge1 Well-Known Member

    Messages:
    912
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    140
    Digital Goods:
    1
    #3
    For some reason that actually did work, thank you very much!
     
    Pudge1, Sep 26, 2011 IP
  4. czent

    czent Peon

    Messages:
    45
    Likes Received:
    2
    Best Answers:
    5
    Trophy Points:
    0
    #4
    :) I did try that in my browser before posting. [I'm a CSS coder ;)]
     
    czent, Sep 26, 2011 IP