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. General Discussion
  3. Carousel Text Alignment (Baseline Consistency)

Carousel Text Alignment (Baseline Consistency)

Scheduled Pinned Locked Moved General Discussion
5 Posts 2 Posters 64 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
    MWPA
    wrote on last edited by
    #1

    Hi everyone,

    I'm working on a text-based carousel that displays a series of typographic statements. Each statement has a different line length, and I want to ensure that the first line of each statement aligns consistently on the same baseline.

    Right now, it seems that each text block is placed in its own container with independent positioning and alignment. As a result, the text shifts vertically, creating a visually inconsistent and restless appearance.

    Is there a way to make sure that the first line of every statement starts at the same baseline, regardless of the total height of the text block?

    Thanks in advance for any insights!

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

      do you have a link please?
      i think for texts you can align them top mid or bottom

      Screenshot 2025-02-21 at 14.37.26.png

      maybe we could use align top, and then use some padding top css
      like:

      .slide-text{
          padding-top: 50px;
      }
      

      Enter this css in "lay options" -> "custom css & html" -> "custom css"

      and then you can change the value 50 to sth higher if you like

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

        Thanks, Armin! This solution helps, but I’ve run into a few issues:

        • The text appears inside a box, and when resizing the browser, the text gets cut off. This also happens on mobile (see screenshots for desktop/mobile).
        • I want the text to be vertically centered in the visitor’s viewport, no matter their screen size. With this workaround, I don’t think that will work.

        Do you have any suggestions for fixing this?

        Screenshots:
        Scherm­afbeelding-2025-02-24-om-15.05.58.jpg
        IMG_8429.jpg

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

          how about you choose "fixed height" for the carousel
          and as height enter: 100vh

          this means 100 viewportheight

          if you have a gridder frame top set (the pink bar at the top) this pushes it down if its in the first row

          you can also set the fixed height to
          100vh - 50px

          if for example your frame top is 50px

          .slide-text{
              padding-top: 50px;
              box-sizing: border-box;
          }
          

          also add box-sizing: border-box; to the css so the padding top wont make it grow longer

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

            Thanks, Armin. I found that the best approach to make it work was:

            • Set the vertical alignment of the text slides to "Top."
            • Select "Fixed Height" for the carousel.
            • Set the height to 60vh.
            • Align the carousel to the bottom of the row in the grid layout.
            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
            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