Lay Theme Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Placing sticky element in the gridder

    General Discussion
    6
    15
    681
    Loading More Posts
    • 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
      bb_daniel last edited by

      Dear Armin, dear community,

      has anyone ever tried to place an element in the gridder that gets sticky at a certain scroll-position?

      I want to create this effect:
      https://www.w3schools.com/howto/howto_css_sticky_element.asp

      It works fine when I'm writing the code (position: sticky; top:0;) straight into the HTML and CSS fields. But when I'm applying the sticky class to an Element that lies in the gridder it doesn't seem to work.

      Is there a work-around or something else I have to pay attention to?
      Or maybe an alternate jQuery solution?

      Best, Daniel

      1 Reply Last reply Reply Quote 0
      • mariusjopen
        mariusjopen Global Moderator last edited by

        Dear @bb_daniel
        I will check with Armin if this is actually possible in the Gridder.
        I also did not manage to make it work right now.

        For sure there are jQuery solutions around.

        Best!

        Marius

        www.mariusjopen.world

        1 Reply Last reply Reply Quote 0
        • B
          bb_daniel last edited by

          @mariusjopen
          Thanks a lot!
          Meanwhile I´ll keep looking for alternative solutions.
          ✌🏻

          Best, Daniel

          1 Reply Last reply Reply Quote 0
          • mariusjopen
            mariusjopen Global Moderator last edited by

            Perfect!

            www.mariusjopen.world

            1 Reply Last reply Reply Quote 0
            • arminunruh
              arminunruh Global Moderator last edited by arminunruh

              Maybe because #grid has overflow:hidden; and that is why it doesn't work.

              http://dinbror.dk/blog/help-css-position-sticky-doesnt-work-solved/

              in your custom css write in "lay options" -> "custom html and css":

              #grid{
              overflow: auto;
              }
              
              B 1 Reply Last reply Reply Quote 0
              • B
                bb_daniel @arminunruh last edited by

                @arminunruh
                Hey, thanks for the hint! I tried, but couldn't make it work anyway.
                Would be really cool, to have this feature.
                But I´ll keep searching. Maybe Im doin something wrong…

                Thank You✌️

                1 Reply Last reply Reply Quote 0
                • mariusjopen
                  mariusjopen Global Moderator last edited by

                  Dear @bb_daniel

                  #grid{
                  overflow: auto !important;
                  }
                  

                  Does that help?

                  Best!

                  Marius

                  www.mariusjopen.world

                  B 1 Reply Last reply Reply Quote 0
                  • B
                    bb_daniel @mariusjopen last edited by

                    @mariusjopen
                    unfortunately not.
                    Dis you guys make it work?

                    Best, Daniel

                    1 Reply Last reply Reply Quote 0
                    • mariusjopen
                      mariusjopen Global Moderator last edited by

                      Dear @bb_daniel
                      I would solve it with jQuery and not Css:
                      https://www.medianotions.de/webdesign-blog/jquery/sticky-header-mit-jquery/

                      Hope that helps as well :-)

                      Best!

                      Marius

                      www.mariusjopen.world

                      1 Reply Last reply Reply Quote 0
                      • Baptiste
                        Baptiste last edited by Baptiste

                        Hey guys,
                        Does anyone found something, I tried some stuff with jQuery but can't find a solution...

                        Tried that : https://jsfiddle.net/julienfrog/p87jmj61/1/
                        But I let you know if I find something...

                        Thanks in advance,
                        B.

                        1 Reply Last reply Reply Quote 0
                        • mariusjopen
                          mariusjopen Global Moderator last edited by

                          Der @Baptiste
                          did you have a look here?
                          http://laytheme.com/documentation.html#custom-javascript
                          Best!

                          Marius

                          www.mariusjopen.world

                          1 Reply Last reply Reply Quote 0
                          • Baptiste
                            Baptiste last edited by

                            Hey @mariusjopen ,
                            Yes, you mean the idea of using "jQuery" instead of "$"?
                            Already did but I'm working on it today, hope i'll fix it.

                            I'll let you know if I find something and let me know if you find it too.
                            Thanks a lot.

                            Baptiste.

                            1 Reply Last reply Reply Quote 0
                            • mariusjopen
                              mariusjopen Global Moderator last edited by

                              Dear @Baptiste
                              not only the jQuery. Also how functions get loaded. Have a close look.

                              Best!

                              Marius

                              www.mariusjopen.world

                              1 Reply Last reply Reply Quote 0
                              • K
                                koliveros last edited by

                                @Baptiste @bb_daniel any chance you guys were able to get this to work? trying to add to a new site im working on and cant seem to get it to work, lmk ty

                                E 1 Reply Last reply Reply Quote 0
                                • E
                                  egorkraft @koliveros last edited by egorkraft

                                  @koliveros Hi! How's your progress? Have you managed to get a way to do it? Thanks

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post

                                  Before you post

                                  Use the Search Feature. Maybe there is already a solution to your issue.

                                  1. Update Lay Theme and all Lay Theme Addons
                                  2. Disable all Plugins
                                  3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
                                  4. Now see if your problem solved itself
                                  5. Go here, see if your problem is listed here:
                                  Troubleshooting

                                  When you post:
                                  1. Post a link to where the problem is
                                  2. If the problem is difficult to explain, post screenshots / link to a video to explain it

                                  Thanks!

                                  Online Users

                                  A
                                  D
                                  S
                                  M
                                  K
                                  F
                                  F
                                  O

                                  Recent Topics

                                  • K

                                    Unable to update lay theme / to login wp admin

                                  • S

                                    Theme crashed - because of Polylang?

                                  • A

                                    New button feature not available

                                  • A

                                    carousel addon not working after update

                                  laytheme.com