Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing a Background video with a colour overlay with 100% height
    primarykey
    data
    text
    <p>I am trying add a background video that has a colour overlay with a transparency. </p> <p>I have set up the website structure already, with each Div section with a height of 100% and a background colour. The first div section I want to play a video that is visible through the transparent background colour. </p> <p>I two problems I face is each the video takes over the website or it pushes the content down. </p> <p>Here is a demo: <a href="http://jsfiddle.net/NpgD5/248/" rel="nofollow">http://jsfiddle.net/NpgD5/248/</a></p> <p>My html currently looks like this: </p> <pre><code> &lt;div class="top-section"&gt; &lt;div id="bg"&gt;&lt;video src="" id="bg-video" muted autoplay loop &gt;&lt;/video&gt;&lt;/div&gt; &lt;nav&gt; &lt;/nav&gt; &lt;div id="center-column"&gt; &lt;h1&gt;WELCOME&lt;/h1&gt; &lt;/div&gt; &lt;div class="mid1-section"&gt;&lt;/div&gt; &lt;div class="mid2-section"&gt;&lt;/div&gt; &lt;div class="bottom-section"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>CSS :</p> <pre><code>html, body{ background-color: #ECF0F1; min-height:100%; overflow-x: hidden; margin: 0; padding: 0; } #bg { position: fixed; top: -50%; left: -50%; width: 200%; height: 100%; } /*HTML5 VIDEO*/ #bg video { position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; min-width: 100%; min-height: 50%; } .top-section{ background-color: #3498DB; background-repeat: repeat; position: fixed; top: 0; left: 0; min-width: 100%; min-height: 100%; z-index: 2; } .mid1-section{ min-height:100%; width: 100%; background-color: #16A085; margin: 0; padding: 0; text-align: center; position: relative; } </code></pre> <p>Any feedback is appreciated thank you (Y)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload