The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Is there a way to offset the target position of an anchor?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #37731

    On this website, I have my navigation on the left side and all the images have an anchor tag. When I use the links to navigate to the desired image,(particularly when you scroll towards the images to the left) part of it gets hidden behind the navigation. I was wondering if I can make it scroll so that the image is right at the center?

    Thank you.


    I have the same question which I hope someone can help me with. I have a fixed header. When the anchor link is clicked, the target disappears under the fixed header to the top of the page. How do I offset it? Is there a generic CSS style that will work on every anchor created, without having to list every anchor name in the css? (it is a WordPress site and my client might well be making the anchors in the future). I’m a bit of a technophobe so please don’t make the answer too complicated! This is a sample page in my test site: . Click ‘Beef stroganoff’ in the sidebar menu. Many thanks.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.