Position SVG separator below header with video background

I'm in the process of creating a hero background and I want to make sure that my svg divider is positioned beneath the video to seamlessly blend into the background below.

Currently, it's showing up right next to the buttons, which is not the desired placement.

This is how I'd like it to appear:

https://i.sstatic.net/lJFDN.png

Any suggestions on how to resolve this issue?

<header>
  <div class="overlay"></div>
  <video onloadedmetadata="this.muted = true" playsinline autoplay muted loop preload="auto">
    <source src="https://storage.googleapis.com/coverr-main/mp4/Mt_Baker.mp4" type="video/mp4" />
  </video>
  <div class="container h-100">
    <div class="d-flex h-100 text-center align-items-center">
      <div class="w-100 text-white">
        <h1 class="display-3 text-white">Launch on time,<br />look on-trend.</h1>
        <div class="mb-4">
          <p class="lead px-xl-5">
            Save countless hours of design and development and ship performant sites with killer looks.
          </p>
        </div>
        <button class="btn btn-lg btn-white mx-1">Button 1</button>
        <button class="btn btn-lg btn-primary-3 mx-1">Button 2</button>
      </div>
      <div class="divider flip-x">
        <svg
          width="100%"
          height="96px"
          viewBox="0 0 100 100"
          xmlns="http://www.w3.org/2000/svg"
          preserveAspectRatio="none"
        >
          <path d="M0,0 C40,33 66,52 75,52 C83,52 92,33 100,0 L100,100 L0,100 L0,0 Z"></path>
        </svg>
      </div>
    </div>
  </div>
</header>

I've also shared a fiddle for reference: https://jsfiddle.net/vtb4zep5/.

Answer №1

    <header>
    <div class="overlay"></div>
    <video onloadedmetadata="this.muted = true" playsinline autoplay muted loop preload="auto">
        <source src="https://storage.googleapis.com/coverr-main/mp4/Northern_Lights.mp4" type="video/mp4" />
    </video>
    <div class="container h-100">
        <div class="d-flex h-100 text-center align-items-center">
            <div class="w-100 text-white">
                <h1 class="display-3 text-white">Exciting new look,<br />stay ahead of the curve.</h1>
                <div class="mb-4">
                    <p class="lead px-xl-5">
                        Streamline your web design and development process to create visually stunning websites.
                    </p>
                </div>
                <button class="btn btn-lg btn-white mx-1">Button A</button>
                <button class="btn btn-lg btn-primary-3 mx-1">Button B</button>
            </div>
        </div>
    </div>
</header>
<div style="position: relative">
<div class="divider flip-x" style="position: fixed; bottom: 0px; width: 100%">
    <svg width="100%" height="96px" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none">
        <path d="M0,0 C40,33 66,52 75,52 C83,52 92,33 100,0 L100,100 L0,100 L0,0 Z"></path>
    </svg>
</div>
</div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Using AngularJS to bind to the 'src' property of an <img> tag

There is a table on my website with numerous rows, and each row contains a preview image that should appear in the top right corner when the mouse hovers over it. I attempted to insert an image tag with AngularJS binding for the URL in the src attribute l ...

Transferring the offset of jQuery from one element to another results in their positions being misaligned

In the quest for aligning content vertically between two divs, I have encountered a challenge. Despite my efforts to adjust offsets and heights, the new element in the second div still does not align perfectly with the first one. This is evident in the cod ...

Using play() in HTML Audio prevents the IOS music player from playing

When developing a timer app, I am currently using html audio to play a beep sound by utilizing the audioElement.play() function. The user must interact with the screen to enable sound (press the unmute button). This particular web application acts as a fit ...

How to align radio_button_tag and label_tag side by side in Rails using Twitter Bootstrap 2?

Struggling to align the radio_button_tag horizontally with its label_tag. (Utilizing HAML) =radio_button_tag(:animal, "dog") =label_tag(:animal, "Dog") Which classes should I use for these form helpers to have them positioned side by side as shown below: ...

Discover internal hyperlink using user input and generate a click event for the anchor

Is there a way to use jQuery to locate internal links on a page based on user input and trigger a click event on the anchor tag? ...

Learn the effective way to style ul elements within @mui/material/Menu using CSS

When the button is clicked, I want to apply the following styles to the ul: &.MuiList-root { padding-top: 0px; padding-bottom: 0px; } View the issue in action on this live sandbox: https://codesandbox.io/s/react-typescript-forked-tyd8n8?fil ...

When using JavaScript to style.display = "block", the Bootstrap-4 column layout may experience a display break

My div is initially displaying properly in one row at the beginning. However, when the user changes the select option to "b" and then back to "a," the display breaks. The two texts "my left side text" and "my right text" are displayed on two lines, one be ...

Having trouble with jQuery Animate when trying to change the background-color property?

So, I was experimenting with the jQuery .animate() function and decided to change the background color of a div based on how many pixels the user scrolled. Surprisingly, it didn't work as expected. After switching to the .css() function instead, every ...

Using PHP to create custom HTML email templates and sending them out via

I have successfully used phpmailer to send normal pre-defined emails. Now, I am looking to enhance the email format by connecting my text editor with a PHP script to send HTML emails. The text editor is a template from CKEditor. https://i.stack.imgur.com/v ...

Guide to updating 2 iframes simultaneously with a single link/button using HTML and JavaScript

Just joined the community and looking for help on how to refresh two different iframes within a single page. I came across a solution on Google that involves using getElementById. However, I've heard Firefox can be tricky with IDs. Appreciate any as ...

Bizarre Drop-down Peculiarities

Having a perplexing issue where the 'search' list item is oddly shifted below the dropdown box only when it is displayed. The other list items remain in their correct positions. Any advice on how to resolve this? The appearance and functionality ...

Media queries are behaving incorrectly, causing them to trigger when regular CSS should be applied, and vice versa

When I switch to laptop/desktop view, the regular CSS styles are being overridden in the inspect element, and the query styles are taking precedence. Can anyone explain why this is happening? For instance, let's take a look at the code for the nav se ...

Increasing an ID number automatically using Javascript

I'm currently working on a functionality where a unique number is automatically generated whenever a new record is created. For instance, if I were to click "Create record" on a webpage, the number would auto-fill in the record ID field. Subsequently, ...

Seems like the ng-show events inside are not being triggered, almost like an invisible image

I am encountering an issue where no JavaScript events are triggering inside an ng-show div in my code. You can access my code through the following link on Plnkr: http://plnkr.co/edit/kGqk8x?p=preview Upon loading data from JSON, I set ng-show to true. Ho ...

The POST method in XHR encounters issues on IOS when used with the Canvas to Blob script

Observation I've noticed a specific part of the code that's not functioning correctly only on IOS devices. xhr.open('POST', 'upload.php', true); xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); var da ...

Aligning the text in the middle of a div

I could really use your assistance. How can I align the text in my customized alert box vertically? I assumed that by utilizing the following CSS properties: #alertBox_text { width: 100%; height: auto; text-align: center; margin-top: 10px; } Th ...

What is the process for forming an object from points so that it can be easily integrated into a graphical user interface (GUI)?

I have been following Bruno Simons' Three.js tutorial on Mixing Html with WebGl, specifically the part where you try to attach a text box to a 3D model. I have imported the GUI and set it up, but I am struggling to understand what I need to 'gui. ...

How can I incorporate my styles into a separate css file for use in a React project?

Although it may seem simple, I am interested in incorporating SCSS into my React application for styling purposes. I understand that React will interpret all of my styles and render them in separate <style> tags within the <head> section. I hav ...

"Customizing the topbar of Twitter Bootstrap for right-to

Attempting to implement twitter bootstrap for a top navigation bar on my master page. http://jsfiddle.net/ZqCah/1/ Encountering some issues and seeking assistance: 1- Desiring to switch the direction of all content to right-to-left (rtl). This would me ...

Issues with interpreting PHP within HTML documents

I'm having trouble using PHP on my HTML page. I've added AddType application/x-httpd-php .html to the .htaccess file as recommended, but when I try to access the page in a browser, a dialog box pops up asking if I want to save the file or open it ...