Search code examples
htmlfixedads

Google ad overlaps fixed div?


I recently started to teach myself web development from scratch and am having trouble.

I created a fixed div for the header of my website using a basic html 5 code. The header works great for the most part when scrolling over content, but once it reached a Google ad placement the ad seems to overlap it and scrolls in front the header instead of behind it. Any suggestions on how to fix this problem?


Solution

  • It would help to see some example code, but to begin with try setting the z-index using CSS on the header so that it is higher than the google ad div.