html - Get some space on top when scrolling to a <h2 id="..."> link -


on html page have link like:

<a href="/page.htm#something">  

the other page (page.htm) looks like:

<h1>header</h1> <p>some text</p>  <h2 id="something">the header 2</h2> etc. 

when follow link page.htm#something header2 on top of browser.

my wish room abow it, let's 1em or so.

of course can use:

<a name="something"><br /></a> <h2>the header 2</h2>  

but that's ugly , needs lot more typing.

is there way link positioned lower in webbrowser?

<h2 style="padding-top:20px">the header 2</h2>  

i understood you?


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -