Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3962182
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:03:56+00:00 2026-05-20T03:03:56+00:00

I have a URL with an anchor that is working as it should: site.com/item/id#comment-233

  • 0

I have a URL with an anchor that is working as it should:

site.com/item/id#comment-233

When opened, the anchor will be positioned at exactly the top of the page.

How do I change the starting point? Let’s say I want it to be 50px down from the top.

The reason I’m needing this is because I have fixed layers at the top of the page, so the comment is appearing overlapped behind the fixed header div.

Just in case, because of cross-browser compliance I prefer a solution that does not involve changing the container of the comment to fixed and positioning top minus the height of the header.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T03:03:56+00:00Added an answer on May 20, 2026 at 3:03 am

    Assuming your <a> tag has no content, add a class to it tag with a position:relative; top:-50px;

    Depending on your document, you my also have to wrap it in an absolute <div>

    This should be cross-browser compatible if implemented correctly.

    EDIT

    This is the test I’ve done locally and it works fine in FF 3.6

    <html>
    
        <body style='margin:0; padding:0;'>
            <div style='position:fixed; height:50px; background-color:#F00; width:100%'>
            Fixed header
            </div>
            <div style='padding-top:50px'>
                <div style='height:100px; margin-top:10px; background-color:#0F0'><a href='#linkhere'>Go to anchor</a></div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>
                    <a name='linkhere' style='position:relative; top:-75px;'></a>
                Link here</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
                <div style='height:100px; margin-top:10px; background-color:#0F0'>Blah</div>
            </div>
        </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At this URL boiseresturants.com/mexican/baja-fresh-mexican-grill.html I have an anchor link that looks like <a href=#takemehere>his
I have a HTML anchor that when clicked should make a div slide up
I have a url that looks like mysite.com/transactions/view/123456 which works fine. however my client
I have URL segment: http://www.site.com/loadContent/contact/4 I want to hide the ID 4 in browser
I have a URL that is either going to be united-states/boulder-21781/tool-&-anchor/mulligan-21/ . Assuming the
I have a URL that is like: www.example.com/task1/1.3.html#a_1 How can I get the a_1
I have URL like: http://example.com#something , how do I remove #something , without causing
I have URL scheme for my blog like this: http://www.example.com/%YEAR%/%MONTH%/%CATEGORY%/%POST_TITLE%/ Now i want to
I have url http://www.domain.com/folder/?variable=1 i would like to do a mod redirect to index.cfm
My permalink structure is set so I have url.com/page I made a basic PHP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.