html - How to adjust a href="#object" -


when using name="object" , having page scroll object using href="#object" id possible adjust page lands. rather top of window, few pixels down. have fixed navigation bar when scrolling, content goes behind nav bar visible. when use href="#object" part of cut off because behind nav bar. fixes? thank you.

change top padding , margin styling on element named anchor. example, if header 100 pixels tall, give named anchor margin-top of -100px , padding-top of 100px.

see jsfiddle example.

in example, link bring bolded text ('vestibulum ante ipsum') 100px top of page.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -