is it possible to?
we have:
<div> <object> ...swf...</object> </div>
Is it possible to align the flash drive inside the diva?
Have a diva put:
margin: 0 auto;
UPD: if vertically yet ..
If you know the width and height, then you can like this. Object style:
left: 50%; top: 50%; margin-left: -(width/2)px; margin-top: -(height/2)px; position: absolute;
Parent diva style:
position: relative;
You can use js to get the dimensions, indent. If js is off, it will be. But otherwise everything will be nya.
Parent block style:
display: table-cell; vertical-align: middle; text-align: center;
But this is not very cross-browser. Perhaps for reliability (and for older browsers), you need another external div with display: table;
Maybe this will help
<style> .object-wrapper {position: relative; left: XXpx; right: XXpx; top: XXpx;} </style><div class="object-wrapper"> ...swf... </div>
If the height of the flash drive is known, then the correct paddings should be put down vertically. If unknown, then
<table> <tr> <td valign="middle" align="center">...</td> </tr> </table>
to help you.
Source: https://ru.stackoverflow.com/questions/9220/
All Articles