[RESOLVED] Getting Anchors to also display themselves.
When clicked, I noticed the anchor point links on my page, jump to the point on the page below the link it was attached to (making it out of sight). I've been trying to get it to also display the anchor part of the page by inserting an empty anchor tag above the point, but hack doesn't work.
Is there a way I can achieve this?
<div><a id="some_menu" style="margin-bottom:100px"></a></div>
<h2><?php echo $lang['some_menu']; ?></h2>
<p><?php echo $lang['some_text']; ?></p>
Last edited by leke; 05-29-2013 at 05:18 PM.
I figured it out
It just needed some top padding.
<a id="someName" style="padding-top: 50px;"></a>
You've found a solution, but I doubt that it is the "right" one. I would question why you are using an anchor in the first place? Why not just set padding-top in the heading? e.g.
<h2 id="my-id" style="padding-top:50px;">some heading</h2>
Last edited by jedaisoul; 05-31-2013 at 04:23 PM.
For some reason, I thought anchors needed the <a>, but turns out not to be so. This way forces there to actually be padding above the header, but it looks ok, so it all worked out.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)