Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • 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 1.0k Views 1 Watching
  • 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
    J
    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
      mariusjopenM
      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
        J
        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
          J
          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
            mariusjopenM
            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
              R
              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

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              Online Users
              A
              Anna_S
              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