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 140 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.
  • C Offline
    C Offline
    cactusauvage
    wrote on Feb 27, 2025, 3:00 PM last edited by cactusauvage Mar 1, 2025, 12:07 AM
    #1

    Hello @arminunruh ! I found an old topic here http://laythemeforum.com:4567/post/10947 explaining how to squared images of the thumbnails cover of a project.

    I don't have that much of knowledge in code and CSS but when I try to add this line of code in appearance -customize - CSS, it's cropping all the images of the website. How to crop only the pictures of a project thumbnail gridd ?

    For an exemple, on this website, all images are alignes the same ratio but when you clic on the project, the images recover their normal ratio
    Capture d’écran 2025-02-27 à 15.50.08 copie.jpg Capture d’écran 2025-02-27 à 15.50.55 copie.jpg

    Thank you for your help !!

    Maria x

    1 Reply Last reply
    0
    • A Offline
      A Offline
      arminunruh
      Global Moderator
      wrote on Mar 3, 2025, 3:45 PM last edited by
      #2

      ah yea

      use

      .type-thumbnailgrid .ph {
          padding-bottom: 50% !important;
      }
      
      .type-thumbnailgrid .ph img {
          object-fit: cover;
      }
      
      C 1 Reply Last reply Mar 17, 2025, 6:17 AM
      0
      • M Offline
        M Offline
        MWPA
        wrote on Mar 4, 2025, 5:43 AM last edited by
        #3

        @arminunruh Is this also possible for the Element Grid with images in it?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          arminunruh
          Global Moderator
          wrote on Mar 5, 2025, 12:25 PM 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 Mar 6, 2025, 9:02 PM last edited by MWPA Mar 6, 2025, 4:04 PM
            #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
            • A Offline
              A Offline
              arminunruh
              Global Moderator
              wrote on Mar 11, 2025, 11:23 AM 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
              • A arminunruh
                Mar 3, 2025, 3:45 PM

                ah yea

                use

                .type-thumbnailgrid .ph {
                    padding-bottom: 50% !important;
                }
                
                .type-thumbnailgrid .ph img {
                    object-fit: cover;
                }
                
                C Offline
                C Offline
                cactusauvage
                wrote on Mar 17, 2025, 6:17 AM last edited by cactusauvage Mar 17, 2025, 2:20 AM
                #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
                • A Offline
                  A Offline
                  arminunruh
                  Global Moderator
                  wrote on Mar 18, 2025, 8:09 PM last edited by
                  #8

                  ok do u have a link please

                  C 1 Reply Last reply Mar 20, 2025, 2:39 PM
                  0
                  • A arminunruh
                    Mar 18, 2025, 8:09 PM

                    ok do u have a link please

                    C Offline
                    C Offline
                    cactusauvage
                    wrote on Mar 20, 2025, 2:39 PM last edited by
                    #9

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

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      arminunruh
                      Global Moderator
                      wrote on Mar 21, 2025, 4:20 PM last edited by
                      #10

                      Screenshot 2025-03-21 at 17.19.55.png

                      i just see this

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        arminunruh
                        Global Moderator
                        wrote on Mar 21, 2025, 4:25 PM 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

                        C 1 Reply Last reply Mar 23, 2025, 5:08 PM
                        0
                        • arminunruhA arminunruh
                          Mar 21, 2025, 4:25 PM

                          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 Mar 23, 2025, 5:08 PM 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 Mar 31, 2025, 3:06 PM 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 Mar 31, 2025, 3:19 PM 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
                              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