I\'m using a static bar at the top of my site, about 20px high. When I click an anchor link(for those who don\'t know, the navigation on wikipedia works like that. Click a t
CSS-only: it's a little dirty, but :target {padding-top: 20px;} would work if you are linking to a block element (I assumed you do, since your question says div). However, it might not look so good when you scroll manually afterwards. Example http://dabblet.com/gist/3121729
Still, I think that using a bit of JavaScript to fix this would be nicer.