Pure CSS solution
<li id="comment-277" class="comment-body comment-child comment-level-odd comment-even comment-by-author">
.comment-body { position: relative; padding-top: 50px; margin-top: -50px; } /*Fix comment jump positioning problem*/
Use javascript to adjust the scroll value
if (window.location.hash.indexOf('#') >= 0) { $('html,body').animate({ scrollTop: ($(window.location.hash).offset().top - 50) + "px" }, 300); }; // Inaccurate positioning of main repair comments BUG $('#comments a[href^=#][href!=#]').click(function() { var target = document.getElementById(this.hash.slice(1)); if (! target) return; var targetOffset = $(target).offset().top - 50; $('html,body').animate({ scrollTop: targetOffset }, 300); return false; }); // Inaccurate positioning of main repair comments BUG
Reference article