Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Bug Reports
  3. Use of "Browser height as row height" bug? Video clipped instead of contained

Use of "Browser height as row height" bug? Video clipped instead of contained

Scheduled Pinned Locked Moved Bug Reports
7 Posts 3 Posters 195 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thomasmaier
    wrote on last edited by
    #1

    Hi,
    I want to just show one HTML5 video in the first row of a page. It is necessary that the video is being shown form edge to edge on page load. Therefore I want to make use of the "Browser height as row height" feature. I specifically don't want to use Fullscreen Slider or Cover Feature for that.

    Though the problem is that the video is being cut off instead of resized smaller to fit into the row. The video should be centered in the row to all sides and either have 100% width or 100% height of the row.

    I tried to force the video to do that with custom css, but it doesn't work. I gave the video an ID (#intro_clip):

    #intro_clip video {
        max-height: 100vh !important;
    }
    

    But that doesn't do what I want.

    Let me know if you want to have a look yourself, I can send you the website and login.

    1 Reply Last reply
    0
    • RichardR Offline
      RichardR Offline
      Richard
      Global Moderator
      wrote on last edited by
      #2

      Dear @thomasmaier

      Nice to hear from you,
      At this point could you post a link to your website with the video & we will take a look

      Thank you for using Lay Theme!

      Best wishes
      Richard

      1 Reply Last reply
      0
      • T Offline
        T Offline
        thomasmaier
        wrote on last edited by
        #3

        Hello Richard,

        Thanks, I will send the details via email.
        Highly appreciated if you could have a look.

        Best

        Thomas

        1 Reply Last reply
        0
        • arminunruhA Offline
          arminunruhA Offline
          arminunruh
          Global Moderator
          wrote on last edited by
          #4

          hey @thomasmaier

          I just got ur mail with the login details, thx.

          So I inserted the video as a background-video instead of as a normal element.
          The row is a browser height row now.

          Then I gave the row a class of "contain-bg-video"
          and put the following css in lay options -> custom html & css:

          .contain-bg-video .background-video video{
              object-fit: contain!important;
          }
          
          1 Reply Last reply
          0
          • T Offline
            T Offline
            thomasmaier
            wrote on last edited by
            #5

            Awesome! Nice trick!

            1 Reply Last reply
            0
            • T Offline
              T Offline
              thomasmaier
              wrote on last edited by thomasmaier
              #6

              For documentation:

              I have added another bit of code, to change the 100%-viewport row height to something smaller, so a small piece of the second row is visible, plus I subtracted the Top Frame margin so the video is not hidden by the fixed-positioned header:

              .row._100vh, .row._100vh.empty {
                  height: calc(90vh - 100px)!important;
                  min-height: calc(90vh - 100px)!important;
                  max-height: calc(90vh - 100px)!important;
              }
              
              1 Reply Last reply
              0
              • RichardR Offline
                RichardR Offline
                Richard
                Global Moderator
                wrote on last edited by
                #7

                Dear @thomasmaier

                Awesome & great to hear :)

                Thank you for using Lay Theme!

                Best wishes
                Rich

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                I also code custom websites or custom Lay features.
                šŸ’æ Email me here: šŸ’æ
                info@laytheme.com

                Before you post:
                1. When using a WordPress Cache plugin, disable it or clear your cache.
                2. Update Lay Theme and all Lay Theme Addons
                3. Disable all Plugins
                4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                This often solves issues you might run into

                When you post:
                1. Post a link to where the problem is
                2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                Online Users
                A
                alasdair17
                Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                laytheme.com
                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Recent
                • Tags
                • Popular
                • Users
                • Search