Reputation: 35
I want to adjust size of embed youtube video in Wordpress, but it goes full width (Wordpress blog page). I want e.g. 60% of page. How do I change it?
Upvotes: 1
Views: 8860
Reputation: 15
Code below works better.
iframe {
width: 896px !important;
height: 504px !important;
}
Upvotes: 0
Reputation: 21
This worked best for me:
iframe {
max-width: 50% !important;
max-height: 50% !important;
}
No black framing pillars or weird sizing.
Upvotes: 2
Reputation: 70
Try this (tested):
iframe {
width: 40% !important;
height: 40% !important;
}
This will affect all iframe
elements on your website. Add the above CSS in the theme customiser on WordPress.
Upvotes: 0
Reputation: 11
You need to change the css style of your theme.
My suggestion:
1)inspect the page of blog and discover what tag the video is child.
2) Go to the de css style page and put the follow code with the tag of your blog:
#blog-id .iframe {
width: 60%!important;
}
Upvotes: 0
Reputation: 16
if you are using a plugin then it must have some kind of dimension options there. But if you are not using any plugin then use might have to use custom css. But you might not able to use iframe within wordpress as it allows only http not https inside i frame.
Upvotes: -1