Offsetting Anchor Links with Fixed Header

Started by NaneK, February 13, 2017, 08:25:42 PM

Previous topic - Next topic

NaneK

Hello,

I am working on my theme and I hit a dead end...

My theme is using position:fixed global menu that is on top of the site.
The problem is when I visit anchor link (eg. last post button) and I get to that post, my global menu covers some of user info on user profile. I would like to add offset (margin-top or padding-top) to those links, so when I visit anchor link global menu displays a few pixels above user profile.

You can see it here on images


Gluz

I have this problem in one edit of one theme.

Search in /Themes/your_theme/Display.template.php for this:
// Show the message anchor and a "new" anchor if this message is new

In the part
<a id="msg', $message['id'], '"></a>', $message['first_new'] ? '<a id="new"></a>' : '';

Modify like this:
<a id="msg', $message['id'], '" style="display:block;"></a>', $message['first_new'] ? '<a id="new" style="display:block;"></a>' : '';

That way, the anchor link will be just in the right place.

NaneK

Man this works like magic, thank you soooooooooo much  ;D ;D ;D ;D ;D

Advertisement: