SyntaxFix
Write A Post
Hire A Developer
Questions
You dont have to put <iframe> in a parent div at all. You can target exactly youtube iframe with CSS/3:
<iframe>
iframe
iframe[src*="//youtube.com/"], iframe[src*="//www.youtube.com/"] { display: block; margin: 0 auto; }