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 5971259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:29:31+00:00 2026-05-22T20:29:31+00:00

I’m trying to build a website where all the ‘pages’ are in a single

  • 0

I’m trying to build a website where all the ‘pages’ are in a single document. Each ‘page’ is an anchored section, so when I call it from the main navigation which is placed at the top of the site, the section slides into view. But I have two issues: 1) when I link from outside the site, I want to be able to link to any individual anchored section without having the page scroll up (because then you can’t see the Navigation which is placed at the top) and 2) I’d like it so that if I refresh, the page doesn’t start from the beginning. To get what I mean, here’s a site that has exactly the same sliding-content-into-view layout that I have and illustrates exactly what I’d like to have in addition:

http://www.incub.ro/#page-news

Notice how not only the name of the anchor appears on the address bar but the page itself loads in full and doesn’t scroll the anchored subject up to the top? Yeah, well that’s what I’m trying to achieve!

My code looks something like this:

HTML CODE ——

<!-- Commence Navigation -->

<div class="wrapper">

<div id="headcontainer">
  <div id="banner"><a href="#home" class="panel"><img src="images/layout/0_homepage.png" id="top" height="100" width="420"border="0" /></a>

    <div id="navigation">
    <div class="center">
    <ul id="topnav">
        <li><a href="#link1" class="panel">Link 1</a></li> 
        <li><a href="#link2" class="panel">Link 2</a></li> 
        <li><a href="#link3" class="panel">Link 3</a></li> 
        <li><a href="#link4" class="panel">Link 4</a></li>
    </ul>
    </div>
    </div>
  </div>
</div>

<!-- End Navigation -->


<!-- Commence Content -->

<div id="wrapper">
<div id="mask">


    <div id="home" class="item">
    <a name="home"></a>
    <div id="container-slideshow"></div>
    </div>
    </div>

    <div id="link1" class="item">
    <a name="link1"></a>
    <div class="content">
    </div>
    </div>

    <div id="link2" class="item">
    <a name="link2"></a>
    <div class="content">
    </div>
    </div>

    <div id="link3" class="item">
    <a name="link3"></a>
    <div class="content">
    </div>
    </div>

    <div id="link4" class="item">
    <a name="about"></a>
    <div class="content">
    </div>
    </div>

   </div> 
   </div> 
   </div>
   <!-- End Content -->

   <div class="footer"> </div>

CSS CODE ——

body {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.8em;
    background-color: #131419;
    background-attachment: fixed;
    background-image: url("../images/layout/background_lrg2.jpg");
    background-position: center top;
    width:100%;
    overflow:hidden;
    padding: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-left: 0px;
}

.wrapper {
    min-height: 100%;
    height: 70%;
    margin-top: 0;
    margin-right: auto;
    margin-left: auto;
    overflow:hidden; 
  }

#wrapper {
    width:100%;
    height:100%;
    position:relative;
    top:0px;
    left:0;
    overflow:hidden;
}


#mask {
    width:900%;
    height:100%;
    overflow:hidden;
}

.item {
    width:11.1%;
    height:100%;
    float:left;
    margin-right: auto;
    margin-left: auto;
    position:relative;
    top:30px;
    overflow:hidden;
}

.content {
    font-family: Helvetica, Arial, sans-serif;
    color: #d1d1d1;
    font-size: 14px;
    line-height: 22px;
    width: 1000px;
    overflow:auto;
    padding-left: 30px;
    padding-right: 10px;
    padding-bottom: 10%;
    position:relative;
    margin-top: 0;
    margin-right: auto;
    margin-left: auto;
}

I hope that makes sense. Thanks in advance!

  • 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-05-22T20:29:32+00:00Added an answer on May 22, 2026 at 8:29 pm

    Are you willing to use jQuery? If so, maybe this snippet can help:

    $(function() {
        // assigns click action for the a's
        $('#topnav a').click(function(e) {
            // prevent default behavior so clicking the <a> won't go up
            e.preventDefault();
            // get the anchor in the <a> and change the window hash
            // e.g. http://site.com/#link4
            window.location.hash = $(this).attr('href');
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a text area in my form which accepts all possible characters from
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.