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. fixed sized square video

fixed sized square video

Scheduled Pinned Locked Moved General Discussion
9 Posts 3 Posters 103 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.
  • E Offline
    E Offline
    emresenoglu
    wrote on last edited by
    #1

    hello all - total beginner in css, so excuse my cluelesness.
    i'm trying to make a video stick to the right side of the page, and to have it dictate the rest of the elements on the page without changing aspect ratio or cropping. meaning that i don't want to see any padding beneath the video when the page is resized, or have the video cut. ideally the aspect ratio would always stay 1:1 and the video would get smaller if the page is of an odd shape. is this possible?

    square vid.jpg

    senoglu.co

    1 Reply Last reply
    0
    • F Offline
      F Offline
      felix_rabe
      wrote on last edited by
      #2

      what would happen if your browser window is also square? there would be no space left for the text, right?

      1 Reply Last reply
      0
      • E Offline
        E Offline
        emresenoglu
        wrote on last edited by
        #3

        Either that or the text could overlap the video.

        senoglu.co

        1 Reply Last reply
        0
        • F Offline
          F Offline
          felix_rabe
          wrote on last edited by
          #4

          you could try "set browser height for row height" for this row in the gridder and then give the video a class and make it "height: 100vh" with custom css for starters.

          1 Reply Last reply
          0
          • E Offline
            E Offline
            emresenoglu
            wrote on last edited by
            #5

            thanks felix, i will try this.

            senoglu.co

            1 Reply Last reply
            0
            • E Offline
              E Offline
              emresenoglu
              wrote on last edited by
              #6

              i've done as you said i believe, however it doesn't work as intended. can you spot what i'm not doing correct? here's a screen capture:

              https://capture.dropbox.com/rgT1jwc5irpngukN

              senoglu.co

              1 Reply Last reply
              0
              • F Offline
                F Offline
                felix_rabe
                wrote on last edited by felix_rabe
                #7

                @emresenoglu try to use that for your custom video class:

                position: absolute;
                top: 0;
                right: 0;
                width: auto;
                height: 100vh;
                aspect-ratio: 1;

                But you have to reflect if this is the best approach webdesign-wise, also considering mobile and tablet layouts.

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

                  do you have a link please?

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

                    right click your row, choose "use browser height for row height"

                    Screenshot 2024-12-20 at 15.04.54.png

                    for top frame and bottom frame use: 0

                    now select your video in your grid, make sure it is aligned
                    Screenshot 2024-12-20 at 15.05.30.png

                    to middle

                    and make sure to use a square video.
                    this way you dont need to use css.

                    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