How to programmatically collapse space in empty div when google ad does not show

前端 未结 4 844
攒了一身酷
攒了一身酷 2021-02-14 12:45

Is there any way to programmatically collapse the empty space that results when a google ad does not show? If so, I would love to see an illustrative example of the same.

<
4条回答
  •  Happy的楠姐
    2021-02-14 13:32

    I tried to solve it with CSS as Adsense injects various iframe,ins, and divs with various properties.

    This code will collapse whitespace but when you ad is in text, it will overflow some of the text, so inline this needs modification:

    
    

提交回复
热议问题