HTML anchor link in same page

musad0

New Member
I am having a slight problem and need the help of those that have more dev skills under their belt. Thank you all.I have created a few pages with anchor links that go to a certain div in the same page.For example, When I click on the anchor link to the same page it jumps to that section or div in the page, but it shifts the entire html page upwards including the navigation, footer, and everything. So then everything looks off because I am using background images that remain in the same place.So when I first go to this page its fine, until I click the link to go that section versus scrolling down on the page. I put a back to top link there as well. If you click the back to top link the alignment of everything jumps back to the way it should be. So if the user clicks the back to top link they wont see the mistake but if they choose to ignore that and just scroll to the top they will see the shift in the page.So.....when the address bar reads www.mysite.com/page.php its ok. When it says www.mysite.com/page.php#top it's ok.But when it says www.mysite.com/page.php#california the alignment is messed up and all the elements including the myaccount link at the top hugs the very top of the browser window along with the company logo etc.Where should I start looking to fix the problem? I designed the page to be somewhat lengthy but would be fine with an anchor to the same page. I even put a jquery scrollto function in there so it has a smooth transition to the section versus a quick jump to it.Can someone help me out? I am desperate.
 
Back
Top