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. General Discussion
  3. Videos & Single Images width & height

Videos & Single Images width & height

Scheduled Pinned Locked Moved General Discussion
12 Posts 2 Posters 669 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
    this
    wrote on last edited by
    #3

    Dear Marius
    Thank you for your Feedback, I created a class .videothis for the video and added

    .videothis {
    height: 100vh !important;
    object-fit:cover !important;

    }
    But this is the result:
    https://thisisthis.ch/durst

    any ideas what I could be missing?
    I tried a lot but I can't seem to strech it over the whole side when.
    When the window is resized to a smaller desktop/Tablet size, the video keeps at full width, but sticks it to the top?
    Thank you!
    Joel

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

      Dear @this
      probably you need to also adress the video inside your class.

      .videothis
      video  {
      height: 100vh !important;
      object-fit:cover !important;
      }
      

      Best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • T Offline
        T Offline
        this
        wrote on last edited by
        #5

        Dear @mariusjopen
        With the video beeing also adressed, it just sticks to the bottom now:
        https://thisisthis.ch/durst

        Maybe this example gives you another idea/hint of where the problem may lay?
        Thanks a lot!
        Joel

        1 Reply Last reply
        0
        • mariusjopenM Offline
          mariusjopenM Offline
          mariusjopen
          Global Moderator
          wrote on last edited by
          #6

          Dear @this
          play around with the parent classes:

          .videothis {
              height: 100vh;
          }
          

          Best!

          Marius

          www.mariusjopen.world

          1 Reply Last reply
          0
          • T Offline
            T Offline
            this
            wrote on last edited by
            #7

            Dear @mariusjopen
            I tried that already, this snippet simply sticks the video to the top, but it doesn't cover the whole height or get's scaled up in any way...
            Would you like to have access to the site so you can see more details?
            Best
            Joel

            1 Reply Last reply
            0
            • mariusjopenM Offline
              mariusjopenM Offline
              mariusjopen
              Global Moderator
              wrote on last edited by
              #8

              Dear @this

              .html5video {
                  position: relative;
                  height: 100vh;
              

              This is what I meant with parent classes.

              Best!

              Marius

              www.mariusjopen.world

              1 Reply Last reply
              0
              • T Offline
                T Offline
                this
                wrote on last edited by
                #9

                Dear @mariusjopen

                It works!
                Only problem is, the .html5video class also effects other elemtens like the one on the right side of the homepage. This Video now moves up?!

                I added a sketch for reference because I didn't want the snippet to stay in there.
                I tried to switch classes or to reset some properties in another class, added to that video on the homepage - without success...

                Also I was not able to strech a single image the same way like the Video, I tried adding the snippet to the .img class and added my own class .einzelbild to the image in the lay editor, but I could not get it to work...
                https://thisisthis.ch/rush-hour

                Thank you so much for all your help!
                Joel !

                0_1565263047576_Snippet.jpg

                1 Reply Last reply
                0
                • mariusjopenM Offline
                  mariusjopenM Offline
                  mariusjopen
                  Global Moderator
                  wrote on last edited by
                  #10

                  Dear @this
                  as well you need to give 100vh to the video element. Use object fit. And of course to the parent element to give it the space to stretch out.

                  Best!

                  Marius

                  www.mariusjopen.world

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    this
                    wrote on last edited by
                    #11

                    Dear @mariusjopen

                    I did give "height: 100vh;" to the video element as you suggested, but this resulted in a missplaced video element on the front page, as shown in the screenshot above.
                    I also added "object-fit: cover;" to the parent element (which is .ph I think?), but it didn't help.

                    Here's all the costum CSS I use right now, maybe you see a flaw?

                    .col .lay-carousel {
                    height: 100vh;
                    top: 0px !important;
                    margin-top: 0px !important;
                    padding: 0px !important;
                    }

                    .flickity-slider {
                    height: 100vh;
                    top: 0px !important;
                    }

                    .lay-carousel-slide {
                    top: 0 !important;
                    height: 100vh;
                    margin-top: 0px !important;
                    }

                    .col .lay-carousel img.h100 {
                    height: 100vh !important;
                    top: 0;
                    object-fit: cover!important;
                    width: 100%;
                    }

                    .videothis video {
                    height: 100vh !important;
                    object-fit:cover !important;
                    }

                    .html5video {
                    position: relative;
                    height: 100vh ;
                    object-fit: cover !important;
                    }

                    .ph{
                    object-fit: cover !important;
                    }

                    1 Reply Last reply
                    0
                    • mariusjopenM Offline
                      mariusjopenM Offline
                      mariusjopen
                      Global Moderator
                      wrote on last edited by
                      #12

                      Dear @this
                      I added this and it works:

                      video {
                          object-fit: cover !important;
                          height: 100vh !important;
                      }
                      

                      :-) ?

                      Best!

                      Marius

                      www.mariusjopen.world

                      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