I don’t have a url for you to go to, but if you look at the attached image, you can see my problem.
I do want the video to fill the height of the screen, but below the header. It seems that the main content is layering over the video and then the video is too long.
<div class="videoslide">
<div class="video-background">
<div class="video-foreground">
<iframe src="https://player.vimeo.com/video/241717140?autoplay=1&loop=1&title=0&byline=0&portrait=0" width="3600" height="2025" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="allowfullscreen"></iframe>
</div>
</div><div class="vid-info">
<p class="unpar">Unparalleled IT Support For Small to Medium-Sized Businesses in Phoenix, Scottsdale, and Tempe</p>
<h1>An IT partner who’s at<br>your service</h1>
<p class="itsol"><strong>We care about your business like it’s our business,</strong> by providing straightforward and reliable IT solutions motivated by your happiness.</p>
<p class="bts"><a href="#" class="btn btn-lg slide">Learn more</a><a href="#" class="btn btn-lg slide">Get started now</a></p>
<p class="logs"><img src="/mytek/images/landing_page/BBB-logo.png" alt="Mytek | Better Business Bureau"><img src="/mytek/images/landing_page/Inc5000-logo.png" alt="Mytek | Inc. 5000"><img src="/mytek/images/landing_page/RankingAZ-logo.png" alt="Mytek | Arizona Ranking"></p>
</div>
</div>
Can you explain what you want to happen exactly as its not clear from your description?
Do you mean you want the video to start after the header and then continue to the bottom of the viewport? Then you want your main content to start below the video so that you have to scroll to reach it?
Or as is usually the case you want your content layered on top of the video with the video appearing as the background?
Of course as your video is fixed positioned it will not move and will always occupy the background of the viewport. If you want the video to scroll away then you will need to remove the fixed positioning and use another method.
It also means that as the screensize gets smaller your initial overlay text will be too large to fit in the viewport so you will need to address that issue with media queries etc and make it fit better.
That text should be BELOW the video and not behind the intro text layer.
What I would like is the video to display below the header and can take the height of the browser screen. The resizing for mobile devices would be implemented with the use of both em and rem when I get the video issue solved.
If I understand correctly you want a header outside of the video and you can do that like this.
Should work in IE11+ modern browsers. The video will start under below the header (wherever that may be) and will go down to the bottom of the viewport unless the text content is taller than the viewport and the video will stretch down with the content rather than cutting the content off or having it overflow.
(IE11 required extra divs to make it work)
(Needs thorough testing as only knocked it up quickly. :))
Yes they are needed to create the table-row structure which must have a table-row followed by a table-cell in order to utilise the stretching and collapsing behaviour of tables. You can in some cases omit the table row but you need at least one otherwise cells go horizontal. The other extra div were as I mentioned for IE11 which was misbehaving.
In the end though an extra div here and there is of no consequence unless you are consistently adding superfluous wrappers.
PaulOB,
I seem to be having a little trouble with the video content not being responsive on the width scale. Meaning, even if the screen size gets smaller, the text should wrap nonetheless. That’s not happening in this case with smaller devices. Instead it’s running off to the side.
I’ll need to see your page as that doesn’t happen in my codepen demo.
Sounds as though you still have a width in there somewhere which should have been fluid. Or you have an unbroken element or image that is wider than the viewport and should have been responsive.
Sounds as though you still have a width in there somewhere which should have been fluid…Or you have an unbroken element or image that is wider than the viewport…
Well that’s what I was figuring, but I don’t see any fixed widths. As for the elements within that video container, I’m still searching but appreciate the second set of eyes.
Thank you for that, PaulOB. The reason why I suspected it was the “.dfbeb” was when I went through the Developer Tools, I saw that this has flexible px width. When I added ‘display: none’, the problem disappeared. Never thought it was the button.
Okay, so now that’s fixed, I’m seeing on a mobile device that the video container is hiding the video content. I’m assuming that this is caused by the way the ‘vh’ is being handled? Screenshots:
Reduce the size of the heading text and reduce the button sizes so that they fit side by side on smaller screens.
You only have little limited space on a small device so adjust the content to make better use of it. Indeed you may want to simplify the text for smaller screens or omit some details.
There is only so much space to play with when you want this 100% effect and you don’t want the text to overflow below the fold.
You should be able to achieve that with a few well chosen media queries