1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Persistant Header Respect Redirects

Discussion in 'Styling and Customization Questions' started by silence, Jun 6, 2013.

  1. silence

    silence Well-Known Member

    Is it possible if you have a persistant header so when you click the arrow to scroll to a users quote, the bar indents a bit as well so it won't cover up some of the content?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. silence

    silence Well-Known Member

    No that doesn't work.
    Here is an example:
    https://xenogamers.org/threads/20475/#post-152308
    The header overwrites the top, i set it to 30px but it stills does the same thing (made sure the changes pushed over so throw that question out the window please :) )
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Then you probably need to add a space to the anchor so there is space between each post, at the top of which is the anchor.
     
  5. EQnoble

    EQnoble Well-Known Member

    I came up with this before....it may need some adjusting to the numbers.
    Code:
    <script>
    $(document).ready(function(){
      if ( document.location.href.indexOf('#post') > -1 ) {
        window.scrollBy(100,-105);
      }
    });
    </script>
    
    it can be added to the end of page_container_js_head
     
    Jake Bunce and silence like this.
  6. silence

    silence Well-Known Member

    Yeah but it's delayed :(
     
  7. EQnoble

    EQnoble Well-Known Member

    You should be able to fix that by getting rid of the doc ready.
     
    silence likes this.

Share This Page