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. Multiple row sticky elements

Multiple row sticky elements

Scheduled Pinned Locked Moved General Discussion
5 Posts 3 Posters 230 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.
  • C Offline
    C Offline
    cesarbourgeois
    wrote on last edited by
    #1

    Hi everyone,

    I recently update my website in a one page approach and with new design: https://www.bourgeoiscesar.com/

    If you open the website you can notice that each project name+description is written after its content/images. I tried to use sticky elements to have it fixed on top (at the place of the BIO text for instance) while scrolling through and then switching to the following. The issue is that sticky elements works only in one row and you must use stacks to achieve the desired effect. I can't have the same freedom in the grid as I cant add two images side by side + aligned horizontally.

    Is there any way to make sticky elements through multiple and specific rows?
    Or another way with another logic I'vent even thought about?

    Thank you and good Sunday!

    César ;^)

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

      hey great website!

      well you could make elements position fixed using custom css, but thats something quite different than sticky

      you could make a whole row sticky using custom css, by right clicking the row, giving it a class name and then creating custom css for it

      but then the row won't ever stop sticking to the top once you have scrolled it into view

      im in the process of re-developing the gridder and then i will add more functionality to it

      so this will take a very long time!
      so at the moment theres no other way to do it except put things in a stack and yes it really limits your ability to layout things :|

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sebagaga
        wrote on last edited by
        #3

        Hi, I am curious how to do this:

        You can make a whole row sticky using custom CSS by right-clicking the row, giving it a class name, and then creating custom CSS for it.

        I have been trying a few methods through CSS, but I haven’t been able to get it to work. The row simply doesn’t stick. Is there something I should consider? is this possible?
        many thanks

        1 Reply Last reply
        0
        • arminunruhA Offline
          arminunruhA Offline
          arminunruh
          Global Moderator
          wrote on last edited by
          #4
          .sticky-row{
              position: sticky;
              top: 0;
              z-index: 9999;
          }
          

          and give your row a class of:

          sticky-row

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sebagaga
            wrote on last edited by
            #5

            This was extremely helpful! I don’t know how many hours I spent on this. Thanks a lot

            I had to add some extra pixels to the top and specify the value in pixels. Adding a background color also helped.

            Here’s the final CSS that worked for me:
            .sticky-row {
            position: sticky;
            top: 50px;
            z-index: 9999;
            background: white;
            }

            1 Reply Last reply
            1
            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