Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8698201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:40:53+00:00 2026-06-13T01:40:53+00:00

I try to load specific location in same page. so I use this code

  • 0

I try to load specific location in same page. so I use this code and its work fine.
Here the JSFIDDLE.

<div class="header">This is Header</div>
<div id="nav" class="clearfix">
<a href="#headline1">1</a>
<a href="#headline2">2</a>
<a href="#headline3">3</a>
<a href="#headline4">4</a>
</div>
<div class="section">
<h1><a name="headline1">Headline One</a></h1>
<p>Lorem ipsum dolor sit amet...</p>
</div>

<div class="section">
<h1><a name="headline2">Headline Two</a></h1>
<p>Lorem ipsum dolor sit amet...</p>
</div>

<div class="section">
<h1><a name="headline3">Headline Three</a></h1>
<p>Lorem ipsum dolor sit amet...</p>
</div>

<div class="section">
<h1><a name="headline4">Headline Four</a></h1>
<p>Lorem ipsum dolor sit amet...</p>
</div>

But the problem is, the header is fixed on position top. When I click the link 1, the Headline one is goes back on header. So the h1 content is not show.

Please visit this Fiddle. You can understand what I am try to say.
Thank you for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:40:54+00:00Added an answer on June 13, 2026 at 1:40 am

    Simple way: Use padding on the “name” element, to counter the header.

    See http://jsfiddle.net/sAdK5/3/

    .section h1 a {
        display:block;
        padding-top:100px;
    }
    

    A more complicated way: put all content inside a div container and create inline scrolling with CSS.


    You could aslo use jQuery to add the extra scrolling.

    See: http://jsfiddle.net/sAdK5/11/

    What we do is, create the scrollbar inside the #content area, and measure the height of the window, minus the header – and call it on every window resize.

    $(document).ready(function(){  
       resizeContent();
      //attach on resize event
       $(window).resize(function() {
           resizeContent();
        });
    });
    function resizeContent()
    {
      //#content height equals window height minus .header height
       $('#content').css('height', $(window).height() - $('.header').height());
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use umbraco with my website, when I try to load a specific page
i have the following code to try and load a local html page in
Let's say I use jQuery to load new content into a specific DIV element.
When I try to load the following page in IE7 & IE8 I receive
I'm diving into iOS development and when I try to load a specific Facebook
I want to catch a specific failure of this JavaScript code: var script =
I try to load the customview class that is inside my mainclass in xml.
I try to load data into a certain column into a table with the
I try to load a node only to face the EInvalidPointer error on Delphi.
I try to load files in different categories according to theis file name. Till

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.