0

On a html page I have a 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 I follow the link to page.htm#something then the header2 is exactly on top of the browser.

My wish is that I get some room abow it, let's say 1em or so.

Of course I can use:

<a name="something"><br /></a>
<H2>The header 2</H2> 

But that's so ugly and needs a lot more typing.

Is there a way that this link is somewhat positioned lower in the webbrowser?

Arjan
  • 22,808
  • 11
  • 61
  • 71
luvTweb
  • 159
  • 1
  • 2
  • 9

1 Answers1

0
<H2 style="padding-top:20px">The header 2</H2> 

I understood you?

nicael
  • 18,550
  • 13
  • 57
  • 90
  • Margin will not work, because it is out of the box model. Instead, use padding instead. – Terry Jun 08 '14 at 08:12
  • @Terry so padding-top? – nicael Jun 08 '14 at 09:54
  • Nicael, that will influence my page layout. I have chosen to have (almost) no padding-top or margin-top only in my design, only padding-bottom and margin-bottom. My feeling says that there must be another way, can't imagine that I'm the only one that complains about this ugly "top of page" alignment. – luvTweb Jun 08 '14 at 22:12