I have a page which has a fixed header at the top, which is 63px in height. below this I have different sections of the page (divs) which are in essence separate pages. Each sec
Ive got an even better solution to this problem.
• Firstly in the css a class can be created (call it whatever you want)
.anchor{
display:block;
height:63px; /* this is the height of your header */
margin-top:-63px; /* this is again negative value of the height of your header */
visibility:hidden;
}
• In the HTML just before your actual div section starts, for example mine is #landingcontainer you should add a span tag with the class of anchor (which we made above) and an id of whatever you want. for me I did this :
Then the actual link will not now be linked to your actual div id of the section you want to take them to, but rather the id of the span tag must be given in the link.
HOME
AND THERE YOU HAVE IT!
what we are doing here in essence is making the browser stop where the span starts which is exactly the height of the header, which then makes the viewer non the wiser ;)