aegirzhu / teacozy

0 stars 0 forks source link

Anchor tag #2

Open mml1 opened 6 years ago

mml1 commented 6 years ago

It seems like you were having issues with anchor tags. You do not have to give the link a class of anchor nor create an empty link tag. Instead, you can go directly to an element with the id. Check out the resource below.

<a class="anchor" id="locations"></a>

https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_a_href_anchor

https://github.com/aegirzhu/teacozy/blob/master/index.html#L25 https://github.com/aegirzhu/teacozy/blob/master/index.html#L34 https://github.com/aegirzhu/teacozy/blob/master/index.html#L67

aegirzhu commented 6 years ago

I did that because after the header was fixed, the anchors remain in the same position which would be covered by the header. I used to offset the anchors to that they would appear beneath the header to look nicer.

aegirzhu commented 6 years ago

/ offset anchor because of fixed header / a.anchor { display: block; position: relative; top: -70px; visibility: hidden; }

just fyi I even commented in the css file.