...

View Full Version : Easiest way to center x and y



danameda
02-27-2011, 08:12 AM
I tried that, but it dont seem to be working:



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.



<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.

Excavator
02-27-2011, 08:30 AM
Hello danameda,
I like this method (http://nopeople.com/CSS%20tips/vertical%20center%20with%20CSS/page4.html) best. Seems pretty bulletproof.

abduraooft
02-27-2011, 02:16 PM
See http://www.wpdfd.com/editorial/thebox/deadcentre4.html



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum