Fathy AR A dev blog: journal, notes, and more...

CSS and JS trick for sticky or fixed header overlapping targeted element

Posted on in Web Dev · 386 words · 2 minute read
Tagged with: CSS, JavaScript, sticky elements

Assume you have an HTML page with sticky/fixed non-scrolling header on top.

Then how should I solve the issue of the header overlapping a targeted element with an anchor (#element-id) i.e. make the browser scroll to the element but still respect the height of the fixed header as not to overlap the element?

Read more…

My First Post

Posted on in Miscellaneous · 58 words · 1 minute read
Tagged with: Quotes

At first, I didn’t know what to type in this very first post. But then I remembered a saying from an ad that I thought was inspiring and relevant to this post and just wanted to share that. So, here it is. “You don’t have to be amazing to start. But you need to start to be amazing.”
Previous Page 2 of 2