Hi all,
Ok, I’m not too sure how to ask this question or explain it but I’ll give it a go.
I’m creating a new site, on the home page there are 4 links that bring the user to a section (div, or in this case a h2 with an id) on another page.
But the thing is, I have a menu that has a fixed position, so when scrolling down the page it will stay in the same position. So, when one of the links on the home page is clicked, the user is brought to the page and the h2 with the id (and some of the content) is behind the menu, if you know what I mean.
Is there a way I can position the h2 and content below the top of the page (90px is the height of the menu, so 90px below the top of the page).
I have implemented something similar (using a jQuery scroll to) but not exactly what I am looking for, on my own site - LINK - and code:
$(document).ready(function() {
$('.scroll-to-home').click(function (e) {
e.preventDefault();
scrollToElement('#homeLink', 1000);
});
$('.scroll-to-myWork').click(function (e) {
e.preventDefault();
scrollToElement('#myWorkLink', 1000, -130);
});
$('.scroll-to-aboutMe').click(function (e) {
e.preventDefault();
scrollToElement('#aboutMeLink', 1000, -130);
});
$('.scroll-to-contact').click(function (e) {
e.preventDefault();
scrollToElement('#contactLink', 1000, -130);
});
});
I can provide a link to current site I am having issues with if needed.
Cheers,
Al.