-
AuthorPosts
-
bobptz Friend
bobptz
- Join date:
- November 2016
- Posts:
- 178
- Downloads:
- 8
- Uploads:
- 19
- Thanks:
- 1
- Thanked:
- 1 times in 1 posts
December 28, 2016 at 6:15 pm #997918I have placed videos (from youtube) on the webpage and I see border lines above and bellow, that I cannot remove.
I used you code from the demo to place a header with a video:
<p> </p> <div class="jumbotron jumbotron-primary masthead btn-action"> <div class="col-md-6" align="left"> <p>The best free Joomla template that you ever need.</p> </div> <div class="col-md-6">video 1: <div class="video-wrapper"><iframe width="560" height="315" frameborder="0" src="//www.youtube.com/embed/KSK2OR9pEUY?modestbranding=1&;showinfo=0&;autohide=1&;rel=0&;hd=1" allowfullscreen="allowfullscreen"></iframe></div> </div> </div> <p> </p> <p>xxxxxxxxxxxx</p> <p> </p> <div> <div class="col-md-6" align="left"> <p>The best free Joomla template that you ever need.</p> </div> <div class="col-md-6">video 2: <div class="video-wrapper"><iframe width="560" height="315" frameborder="0" src="//www.youtube.com/embed/KSK2OR9pEUY?modestbranding=1&;showinfo=0&;autohide=1&;rel=0&;hd=1" allowfullscreen="allowfullscreen"></iframe></div> </div>
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
December 29, 2016 at 2:36 am #998019Hi
This is not from the template, its in the video when u resize the youtube video there is black film under top and bottom.
Here you can see this: http://prntscr.com/dp4uxj
You can set the height auto if you want to make the height auto and it remove the line .bobptz Friendbobptz
- Join date:
- November 2016
- Posts:
- 178
- Downloads:
- 8
- Uploads:
- 19
- Thanks:
- 1
- Thanked:
- 1 times in 1 posts
December 29, 2016 at 11:37 am #998162Hello
I did follow your advice and changed height to AUTO.
Somehow nothing changes. Actually even if I make height to 100, still nothing changes. The problem remains.
see code :
<p> </p> <div class="jumbotron jumbotron-primary masthead btn-action"> <div class="col-md-6" align="left"> <p>The best free Joomla template that you ever need.</p> </div> <div class="col-md-6">video 1: <div class="video-wrapper"><iframe width="560" height="auto" frameborder="0" src="//www.youtube.com/embed/KSK2OR9pEUY?modestbranding=1&;showinfo=0&;autohide=1&;rel=0&;hd=1" allowfullscreen="allowfullscreen"></iframe></div> </div> </div>
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
December 30, 2016 at 2:05 am #998329Hi
Add below code in custom.css file.video-wrapper iframe { height: auto!important; }
Hope it helps.
bobptz Friendbobptz
- Join date:
- November 2016
- Posts:
- 178
- Downloads:
- 8
- Uploads:
- 19
- Thanks:
- 1
- Thanked:
- 1 times in 1 posts
December 30, 2016 at 8:09 pm #998649Hello
This did not help.
I did place this code in the …/templates/purity_iii/css/custom.css file.
What happened is this: All my video files, regardless of width, changed the height to 150 px. I could not trace the css code where this originated, as youtube code was involved.
I had to remove the code and clear the cache.
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 2, 2017 at 2:07 am #998810Hi
By default, the height was set to 100% so if you will add any width it will resize the video with respect to the width if iframe.
Height if the video is 150 because it does not resize the height value. The black border is not from the template or from CSS it by the video when it raised it has to maintain its aspect ratio.bobptz Friendbobptz
- Join date:
- November 2016
- Posts:
- 178
- Downloads:
- 8
- Uploads:
- 19
- Thanks:
- 1
- Thanked:
- 1 times in 1 posts
January 2, 2017 at 8:54 am #998897By default, the height was set to 100% so if you will add any width it will resize the video with respect to the width if iframe.
I will not place a value to width, so I will leave it at the default 100%. No problem with this.
Height if the video is 150 because it does not resize the height value.
I am sorry, I do not follow you. I placed the code as you told me:
.video-wrapper iframe { height: auto!important; }
I do not see why the above code is unable to resize the height and why it becomes 150px.
The black border is not from the template or from CSS it by the video when it raised it has to maintain its aspect ratio.
I never said that the template places the black border. I believe it is from the incorrect width/height values. And I want to control the width/height value, which is placed by the template.
Furthermore I seem completely unable to control the WIDTH of the video.
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 2, 2017 at 10:56 am #998917Hi
The black film is not from the css its from the youtube video . When u set width and height video resize and show it like in your site. Its something u can not control since you are not using video in full container.
Hope its clear now. -
AuthorPosts
This topic contains 8 replies, has 2 voices, and was last updated by bobptz 7 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum