Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2011
    Posts
    21
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Easiest way to center x and y

    I tried that, but it dont seem to be working:

    Code:
    center {
    margin-top: auto;
    margin-bottom: auto;
    margin-right: auto;
    margin-left: auto;
    }
    I was also wondering what is the function of <div id='mediaplayer'>. I was trying to erase that, but it is not showing a player on a page without it.

    Code:
    <script type='text/javascript' src='swfobject.js'></script>
    
    <div id='mediaplayer'></div>
    <script type="text/javascript">    
    var so = new SWFObject('player.swf','playerID','480','270','9');    
    so.addParam('allowfullscreen','true');    
    so.addParam('allowscriptaccess','always');    
    so.addVariable('file', '/videos/bunny.mp4');    
    so.addVariable('image', '/thumbs/bunny.jpg');    
    so.write('mediaplayer');</script>
    Thanks.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,673
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello danameda,
    I like this method best. Seems pretty bulletproof.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •