0BrettA17 4 years ago Thanks for the tip. This came in handy for my personal self defense website, Armor and Shield Tech. http://www.armorandshieldtech.com
0kenvonrauch 8 years ago The following thing worked for me:I put this code in my style.css file:.youtube {margin-right: auto;margin-left: auto;display:block;width:700px;}And I added my youtube video to the actual post like this:http://www.youtube.com/watch?v=cUtw7sjnqFg
0threecheersfornickNachoMahma Answer 12 years ago . text-align won't work as it is not text. <div class="youtube"> <video> </div> +.youtube { margin-right: auto; margin-left: auto }didn't work for unknown reasons
0dawnselenethreecheersfornick Answer 8 years ago you need to add display:block; and a width to make that work
0Padlockthreecheersfornick Answer 11 years ago Add this before the first object tag: <div style="text-align:center"> and this after: </div> Text align still centers it, even though it is not text.
Comments
4 years ago
Thanks for the tip. This came in handy for my personal self defense website, Armor and Shield Tech. http://www.armorandshieldtech.com
8 years ago
I put this code in my style.css file:
.youtube {
margin-right: auto;
margin-left: auto;
display:block;
width:700px;
}
And I added my youtube video to the actual post like this:
http://www.youtube.com/watch?v=cUtw7sjnqFg
12 years ago
. Use CSS. http://www.ehow.com/how_2284643_left-right-center-align-css.html
Answer 12 years ago
. text-align won't work as it is not text
. <div class="youtube"> <video> </div>
+
.youtube {
margin-right: auto;
margin-left: auto
}
didn't work for unknown reasons
Answer 8 years ago
you need to add display:block; and a width to make that work
Answer 11 years ago
Add this before the first object tag:
<div style="text-align:center">
and this after:
</div>
Text align still centers it, even though it is not text.
12 years ago
align=center?