Scrolling back up prevented after clicking link to page anchor (HTML5)

365 views Asked by At

After clicking a link to a section further down the page, scrolling back up is prevented. The browser just stops at the anchor location. I have to erase the #[anchorid] bit from the end of the URL and refresh to get back to the top of the page.

Pretty weird (and aggravating). It also prevents my "back to top" links from working for some reason. I tested it in the latest version of Chrome and Firefox--it does the same with both. I'm only using HTML & CSS, no jQuery or anything. From what I can tell, I've coded it correctly. However, I'm a n00b and I may be missing something obvious. Any help is appreciated!

The section is identified like this:

<h4 id="work">Recent Work</h4>

The link is constructed like this:

<a href="#work">Recent Work</a>

The site is www.autumnfaulkner.com if you want to look at all the code.

1

There are 1 answers

1
Steve Wellens On

In FireFox's Firebug, I removed the margin and padding entries from the style below and it seemed to work:

.holder .even-height {
    float: left;
    margin-bottom: -10000px;
    padding-bottom: 10000px;
}