adsbygoogle adds height: auto important to all its ancestors
![adsbygoogle adds height: auto important to all its ancestors](/content/images/size/w2000/2021/01/joe-yates-Cc4sToR2Oc0-unsplash.jpg)
Today, I have just found that the adsbygoogle library add all of the ads element ancestors height: auto !important
style.
c && (e.setProperty("height", "auto", "important")
This library iterates all ancestors of the ads element and set their style to style="height: auto !important;"
.
If this styling affects other elements and removing it does not affect the appearance of the ads, you can remove it after the ads initialization.
;(window.adsbygoogle || []).push({})
window.document.getElementById('root')?.removeAttribute('style')
![Buy Me A Coffee](https://cdn.buymeacoffee.com/buttons/v2/default-red.png)