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. Addons
  3. Carousel | Slides with individual object-fit

Carousel | Slides with individual object-fit

Scheduled Pinned Locked Moved Addons
6 Posts 2 Posters 264 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.
  • M Offline
    M Offline
    mp
    wrote on last edited by mp
    #1

    Hi there,

    is it possible to adjust the object-fit of individual slides?

    I know how there is a way to customize the individual background-color with this:

    .lay-carousel-slide:nth-child(4) {
        background-color: #000;
    }
    

    But is there a way to adjust the object-fit like this? Would be great if it then would also apply to only a specific carousel ...

    Thanks!

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

      Dear @mp
      yes. You could use this. Then you need to address the element within.
      Can you post a link to your website?
      We will then have a look and inspect that!
      Many wishes!
      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mp
        wrote on last edited by
        #3

        hey, thanks for the answer.

        ... well the website right now is this: http://runningwater.eu, but there is not much to see, except a slightly modified carousel (it never is higher than its width – for mobile).

        the use case would be for images that have a centered area of interest vs. images that are easily cropped. so for example a book spread vs. an installation view. the book spread would need to be centered and preferably never cropped (object-fit: contain;) and the installation view could be cropped and should fill the frame (object-fit: cover;).

        an amazing additional idea would be to add a background image to the images that are contained. This way the slide could be a png with a transparent portion that is always completely visible, with a background-image that is ‘cut‘ to size – this would be a killer feature for portfolio oriented carousels.

        thanks so much, laytheme has really been a lifesaver on tons of projects. :-*

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

          Dear @mp
          thank you for using LayTheme!

          Yes, The transparent background image could be an idea!
          Best!
          Marius

          www.mariusjopen.world

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mp
            wrote on last edited by mp
            #5

            Dear @mariusjopen

            thank you – do you maybe have a pointer for my original question? that would be awesome!

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

              Dear @mp

              .lay-carousel-slide:nth-child(4) img {
                       object-fit: contain !important;
              }
              

              I was not able to test it , but something like this should work.
              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
              C
              craigfeldspar
              P
              panthera
              A
              aerotec
              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