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. tumbnail grid photos all squared

tumbnail grid photos all squared

Scheduled Pinned Locked Moved General Discussion
14 Posts 3 Posters 154 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.
  • arminunruhA Offline
    arminunruhA Offline
    arminunruh
    Global Moderator
    wrote on last edited by
    #4

    yea

    .type-elementgrid .ph {
        padding-bottom: 50% !important;
    }
    
    .type-elementgrid .ph img {
        object-fit: cover;
    }
    
    1 Reply Last reply
    0
    • M Offline
      M Offline
      MWPA
      wrote on last edited by MWPA
      #5

      Hi Armin,

      I’m trying to implement the following code to adjust the image aspect ratio in the thumbnail grid:

      .type-thumbnailgrid .ph {
          padding-bottom: 50% !important;
      }
      
      .type-thumbnailgrid .ph img {
          object-fit: cover;
      }
      

      However, this doesn't seem to work at all. Even after adding !important to override styles, it still doesn't apply the intended changes.

      I’ve also noticed that many other custom CSS styles I’ve added don’t seem to have any effect, as if Lay Theme’s internal code is always overriding them.

      Is this the case? Are there any additional steps needed to make custom CSS work properly in Lay Theme, or is there a particular method to override the theme’s built-in styles?

      Any help or suggestions would be greatly appreciated!

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

        whats the link to the page where this css should be applied?
        i always need a link for where the problem exists
        Screenshot 2025-03-11 at 12.23.16.png

        if none of your css is applied, you can check if your css is written incorrectly

        for example if you have opening braces: { without closing braces afterwards: }
        this can mess up all of your css

        1 Reply Last reply
        0
        • arminunruhA arminunruh

          ah yea

          use

          .type-thumbnailgrid .ph {
              padding-bottom: 50% !important;
          }
          
          .type-thumbnailgrid .ph img {
              object-fit: cover;
          }
          
          cactusauvageC Offline
          cactusauvageC Offline
          cactusauvage
          wrote on last edited by cactusauvage
          #7

          @arminunruh hello @arminunruh , thank you so much for your respond...

          Unfortunately, it's not seem to work inside the project, here are a few examples :
          This is the element grid project view with no css
          redim1.jpg

          This is inside the project with no css
          redim4.jpg

          This is the element grid on project view with the code you provide, as you can see it's working well
          redim3.jpeg

          But inside the project, the images are size up too....redim3.jpeg

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

            ok do u have a link please

            cactusauvageC 1 Reply Last reply
            0
            • arminunruhA arminunruh

              ok do u have a link please

              cactusauvageC Offline
              cactusauvageC Offline
              cactusauvage
              wrote on last edited by
              #9

              @arminunruh yes here is the link : https://cactusauvage.com/category/work/portraiture/

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

                Screenshot 2025-03-21 at 17.19.55.png

                i just see this

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

                  for images and videos in elementgrid:

                  .type-elementgrid .ph{
                      padding-bottom: 100%!important;
                  }
                  .type-elementgrid img,
                  .type-elementgrid video{
                      height: 100%!important;
                      object-fit: cover!important;
                      object-position: center;
                  }
                  

                  for thumbnailgrid:

                  .type-thumbnailgrid .ph{
                      padding-bottom: 100%!important;
                  }
                  .type-thumbnailgrid img,
                  .type-thumbnailgrid video{
                      height: 100%!important;
                      object-fit: cover!important;
                      object-position: center;
                  }
                  

                  i tested this, for me it works

                  cactusauvageC 1 Reply Last reply
                  0
                  • arminunruhA arminunruh

                    for images and videos in elementgrid:

                    .type-elementgrid .ph{
                        padding-bottom: 100%!important;
                    }
                    .type-elementgrid img,
                    .type-elementgrid video{
                        height: 100%!important;
                        object-fit: cover!important;
                        object-position: center;
                    }
                    

                    for thumbnailgrid:

                    .type-thumbnailgrid .ph{
                        padding-bottom: 100%!important;
                    }
                    .type-thumbnailgrid img,
                    .type-thumbnailgrid video{
                        height: 100%!important;
                        object-fit: cover!important;
                        object-position: center;
                    }
                    

                    i tested this, for me it works

                    cactusauvageC Offline
                    cactusauvageC Offline
                    cactusauvage
                    wrote on last edited by
                    #12

                    @arminunruh thank you Armin for your help, I might have a problem because it's still croping the images inside the project..
                    Capture d’écran 2025-03-23 à 18.03.05 copie.jpg Capture d’écran 2025-03-23 à 18.03.27 copie.jpg

                    I might abandon the idea of squared photo for thumbnail project ^^

                    Thank you for your time and your help !

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

                      ok well do you have the link to that page please?
                      with password in case you set a password to your page :DD

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

                        maybe if you try this instead?

                        .type-elementgrid .ph{
                            padding-bottom: 100%!important;
                        }
                        .type-elementgrid img,
                        .type-elementgrid video{
                            height: 100%!important;
                            width: 100%!important;
                            object-fit: cover!important;
                            object-position: center;
                        }
                        
                        .type-thumbnailgrid .ph{
                            padding-bottom: 100%!important;
                        }
                        .type-thumbnailgrid img,
                        .type-thumbnailgrid video{
                            height: 100%!important;
                            width: 100%!important;
                            object-fit: cover!important;
                            object-position: center;
                        }
                        
                        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
                        M
                        mactics
                        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