How to fix the my Anchor link issue [duplicate]
This question already has an answer here:
- How to fix my anchor link issue 4 answers
EDIT: From my previous post, none of the answers can satisfy my needs so I created a jsfiddle here to be more clear.
I am having an issue about my anchor tag.
I have created a
When I click my links, it will jump to the contents div. However, it seems like the content div is covered by the header div which has position:fixed specified. I want the contents jump to below my header div. How do I fix this?
I can't really change the my header div css property here...
Thanks for the help
You mean something like this http://jsfiddle.net/7tMy5/8/ I got this code from http://www.pixelflips.com/blog/anchor-links-with-a-fixed-header/ check it out and see if this is what you wanted to achieve
<span class="anchor" id="section1"></span> <div class="section"></div> <span class="anchor" id="section2"></span> <div class="section"></div> <span class="anchor" id="section3"></span> <div class="section"></div>
This is pretty much the new html markup for the page