-
AuthorPosts
-
August 23, 2014 at 11:52 am #90879
Hello,
I’m trying to resize the youtube video that is on the home page and having trouble resizing it. I’ve read in another thread that it is because of the video width adjusting to the container, and I tried the css
.entry-content iframe, {
width: 80%;
}
on that page, but I’m still having the problem of the video not resizing. I’d like for it to be a smaller video on the home page (not the size it currently is and not in lightbox). I’m also using more videos on that page that will be using lightbox. Will you please tell me specifically how to resize this video but not effect other videos throughout the whole site?Thanks for any help
August 23, 2014 at 11:59 am #90882Hi there,
To resize embedded video you should have a code like the one below:
<iframe width="420" height="345"src="http://www.youtube.com/embed/XGSy3_Czz8k"></iframe>
This way you can change the width and height to your favorite size.Hope it helps.
August 23, 2014 at 12:03 pm #90883correct. this is my code:
[x_video_embed no_container=”true”] <iframe src=”//www.youtube.com/embed/XGSy3_Czz8k” width=”361″ height=”203″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe> [/x_video_embed] and no matter how I change the width or height, it stays the same size (the big size I don’t want).August 23, 2014 at 12:23 pm #90886Hello there,
The best way to force video respect the dimensions you added in iframe code is via css.
Please add the code below to Customize -> Custom -> CSS.x-responsive-video .x-responsive-video-inner iframe { max-width: 361px; min-height: 203px; position: static; display: block; margin: auto; }
Hope it helps.
August 23, 2014 at 1:19 pm #90907Helped a lot. Thanks so much. Will this effect the other videos I will have on the same page? Those will use the lightbox effect.
August 23, 2014 at 2:03 pm #90923Hi T R,
Nope, it’s not. It will only applied on responsive video. Video lightbox is different implementation.
Thanks!
August 23, 2014 at 3:42 pm #90951ok. thx. one more question about that. will the videos in lightbox be responsive also?
August 23, 2014 at 4:40 pm #90970Yes, it should be
August 24, 2014 at 12:42 pm #91316GREAT! Thanks for all of the help! It works great.
August 24, 2014 at 5:15 pm #91374You’re welcome!
-
AuthorPosts