Jump to content
Jim R

Sticky DIV not sticking...

Recommended Posts

Posted (edited)


Here is the page in question:



I don't have any -- overflow: hidden; -- issues, at least not from what I see when I inspect the element.  I do my work in Safari, but I test a lot in Developer mode as well as a separate Chrome browser.  



div.navigation {

  position: -webkit-sticky;
  position: sticky;
  top: 0px;
  background-color: red;
  padding: 10px;
  font-size: 20px;


echo '<div class="navigation">Hello</div>';


Edited by Jim R

Share this post

Link to post
Share on other sites

BTW...the DIV in question is in red, and I'm trying to get it to stick to the top of the browser as the User scrolls down.  

Share this post

Link to post
Share on other sites
28 minutes ago, Barand said:


position: fixed;


Not as intended, and I had tried that earlier.  Sticky is supposed to keep the DIV relative until the "Top" is reached, then stick there.  Maybe it's a theme issue too that I'm using for WordPress, as it hides behind the main navigation until that is off screen.  I need it visible the whole time.  

I thought I was doing well to find the "main" issue that keeps "sticky" from working (overflow: hidden;), but I don't have that issue.  


Share this post

Link to post
Share on other sites

There was a light plugin via WordPress that took care of it.  Not sure it "solves" the problem, but then again, it could be a WordPress/theme issue.  As long as it works, I'm good.  

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.