bendajo bendajo - 1 year ago 115
HTML Question

HTML Links with anchor and pixel

I am looking for a solution without javascript, where I can use an link like this:

<a href='#link1 +60px'>

This is just an example for easier understanding. So what I am trying is, that I got an anchor in my website, and the link goes to that specific point + 60px further.

Thanks for the answers/ideas

Answer Source

So far the following is the best method I could find to position the landing position w/o javascript

HTML (add an additional anchor tag)

 <!-- Actual going to here -->
 <a id="anchorpoint" class="anchor"></a>
 <!-- Display point -->
 <div>Some content here</div>


.anchor {

It's a slight modification of Fixed position navbar obscures anchors. The advantage lies there, that you don't prepopulate padding and margin of the actual container.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download