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

Carousel: responsive height without changing position of captions

Scheduled Pinned Locked Moved Addons
4 Posts 2 Posters 107 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 Offline
    B Offline
    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 Offline
      RichardR Offline
      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 Offline
        B Offline
        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 Offline
          RichardR Offline
          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
          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