Layering Text and Images on background video css

First of all, in your jsfiddle demo, it seems like you didn’t include Bootstrap 4 but you tagged Bootstrap 4 in your question.

To style that person picture in the background, you can just do the same way you did on the video and the overlay: set its position to absolute, top, bottom and right to 0 so that it sticks on the right. I think the tricky part is to set its height to 100% so that it won’t overflow its parent relative container.

Anyway, I’ve cleaned up the layout a little bit and assigned several custom CSS classes so that I can style those classes instead of directly on the elements:

<div class="jumbotron jumbotron-fluid banner">
    <div class="overlay"></div>
    <video />
    <img src="" 
      class="img-background" />
    <div class="banner-content container-fluid">
        <div class="showcase">
            <img id="heyGoodMeeting" 
              class="img-fluid" />
            <p class="description" />
            <a class="btn btn-light btn-lg" />      

And the following is the CSS to stick that person picture in the background:

.banner .img-background {
    z-index: 3;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    height: 100%;

enter image description here


CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top