The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Background HTML5 Video Static Height

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #158106

    Hi guys/gals.

    I have been trying to tackle a problem relating to using HTML5 as a background of a div container. Not to be confused with full page video.

    Basically I have the following:

    What I can’t seem to achieve is to have the video stretch the full width of the container but still retain a static height so that when the window is re-sized the video stays centered. I will be swapping out the video for an image on mobile devices and when the viewport falls below a certain width but until that breakpoint I just can’t seem to figure out how to get it to stay the same height as it’s parent.

    Any ideas/help?

    Thank you in advance.

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.