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 Image Offset

Carousel Image Offset

Scheduled Pinned Locked Moved Addons
6 Posts 3 Posters 474 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.
  • J Offline
    J Offline
    jacobtegel
    wrote on last edited by
    #1

    Hey there,

    i’m working on a site where i want the focused image of a carousel to align with the site title (8.3% offset from the left). I have tried to find out where to put the code but i couldn’t get it to work.
    But what i did notice is that somehow the position of the image will be calculated & offset accordingly, the translate3d seems to change based on the selected image.

    <div class=".swiper-wrapper" style="transition-duration:0ms; transform: translate3d(-4865.4px, 0px, 0px);">
    

    Would it be possible to have a short piece of code where i could alter the offset in such a manner, that the focused image wouldn’t have it’s left border at 0%, but at 8.3%?

    Thank you in advamce!
    Jacob

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

      Dear @jacobtegel
      this is not really possible by default. You probably need to play around and find a hack in CSS.

      Best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jacobtegel
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • J jacobtegel

          Hey there,

          i’m working on a site where i want the focused image of a carousel to align with the site title (8.3% offset from the left). I have tried to find out where to put the code but i couldn’t get it to work.
          But what i did notice is that somehow the position of the image will be calculated & offset accordingly, the translate3d seems to change based on the selected image.

          <div class=".swiper-wrapper" style="transition-duration:0ms; transform: translate3d(-4865.4px, 0px, 0px);">
          

          Would it be possible to have a short piece of code where i could alter the offset in such a manner, that the focused image wouldn’t have it’s left border at 0%, but at 8.3%?

          Thank you in advamce!
          Jacob

          J Offline
          J Offline
          jacobtegel
          wrote on last edited by
          #4

          i’m working on a site where i want the focused image of a carousel to align with the site title (8.3% offset from the left). I have tried to find out where to put the code but i couldn’t get it to work.
          But what i did notice is that somehow the position of the image will be calculated & offset accordingly, the translate3d seems to change based on the selected image.

          <div class=".swiper-wrapper" style="transition-duration:0ms; transform: translate3d(-4865.4px, 0px, 0px);">
          

          Would it be possible to have a short piece of code where i could alter the offset in such a manner, that the focused image wouldn’t have it’s left border at 0%, but at 8.3%?

          So if somebody should come to this thread in search for an answer: you can offset the »focused« image using this code:

          .lay-carousel-slide {
          transform:translateX(8.3vw);
          }
          

          The 8.3vw (viewport-width) gives me the desired effect. Don’t use a percentage since it will be calculated based on the slide itself. Also don’t offset the swiper wrapper itself, since it will break the carousel and it won’t function anymore.

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

            Dear @jacobtegel
            ah wow! Thank you for sharing!

            Best!

            Marius

            www.mariusjopen.world

            1 Reply Last reply
            1
            • J jacobtegel

              i’m working on a site where i want the focused image of a carousel to align with the site title (8.3% offset from the left). I have tried to find out where to put the code but i couldn’t get it to work.
              But what i did notice is that somehow the position of the image will be calculated & offset accordingly, the translate3d seems to change based on the selected image.

              <div class=".swiper-wrapper" style="transition-duration:0ms; transform: translate3d(-4865.4px, 0px, 0px);">
              

              Would it be possible to have a short piece of code where i could alter the offset in such a manner, that the focused image wouldn’t have it’s left border at 0%, but at 8.3%?

              So if somebody should come to this thread in search for an answer: you can offset the »focused« image using this code:

              .lay-carousel-slide {
              transform:translateX(8.3vw);
              }
              

              The 8.3vw (viewport-width) gives me the desired effect. Don’t use a percentage since it will be calculated based on the slide itself. Also don’t offset the swiper wrapper itself, since it will break the carousel and it won’t function anymore.

              R Offline
              R Offline
              Remco van Dun
              wrote on last edited by
              #6

              @jacobtegel

              Works nicely, but there is not an equal distance on the right side of the carousel, cropping the picture by 8.3vw since you moved the whole thing. Is there a way to add the same 'padding' to the right you think?

              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
              dafvD
              dafv
              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