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: responsive height without changing position of captions

Carousel: responsive height without changing position of captions

Scheduled Pinned Locked Moved Addons
4 Posts 2 Posters 225 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.
  • B
    B
    billo3D
    wrote on last edited by
    #1

    Hi,

    I am searching for a way to constrain the height of the carousel to browser height without the positioning of numbers and image captions being affected, and without filling the slides. I can temporally replicate this in the browser by changing the computed paddin-bottom style on the .lay-carousel element. Am I missing something?

    Any help much appreciated!
    Thanks!
    Anna

    This is how I would like it to look like:
    2021-03-30 14_11_20-VORLAGE 2021-01.png

    1 Reply Last reply
    0
    • RichardR
      RichardR
      Richard
      Global Moderator
      wrote on last edited by
      #2

      Dear Anna @billo3D

      I think i understand, apologies if i dont :)

      If you are able to get the desired result by altering the .lay-carousel element, can you not add this into:

      Lay Options > Custom CSS & HTML > Custom CSS

      E.g

      .lay-carousel{
      padding-bottom:insert-desired-%-or-px-here;
      }
      

      Or it must come strictly through built in options?
      I think you find like i do that the Captions element, being contained within the Larger Carousel Container element means that they will move together.

      Talk soon & best wishes Anna :)

      Richard

      1 Reply Last reply
      0
      • B
        B
        billo3D
        wrote on last edited by
        #3

        Hi Richard,

        thanks so much for your quick response!
        Unfortunately the CSS doesn't affect anything. I guess a built-in padding-bottom overwrites any CSS.

        I then tried to manipulate via javascript:

        var element = document.getElementsByClassName('lay-carousel');
                console.log(element[0]);
                element[0].style.paddingBottom  = '20vh';
        

        This overwrites the built-in function, however shifts captions and numbers
        2021-03-31 12_45_04VORLAGE 2021-01.png

        Thanks for help!!
        Have a good day,
        Anna

        1 Reply Last reply
        0
        • RichardR
          RichardR
          Richard
          Global Moderator
          wrote on last edited by
          #4

          Dear Anna
          @billo3D

          Using !important at the end of your CSS rule gives it precedence, sorry i should have mentioned that!

          Please let me know if it helps E.g:

          .lay-carousel{
          padding-bottom: 99px !important;
          }
          

          Best
          Richard

          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
          T
          Tatjana241190
          M
          michael_vvc
          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