Most AdSense ads are responsive, which means that they adapt dynamically to the available width of the screen. This ad type is great when it comes to layouts that fit on desktop as well as mobile devices. There is one issue I am aware of that causes publishers a headache: when you show a responsive ad next to a floated element in a text, it can jump below that element and cover anything that follows.
This article describes the solution to this particular problem.
Responsive AdSense ads jumping below a floating image
This problem can happen with AdSense content and link ad units as well as responsive native ads like In-article and In-feed.
Below, you find an example from my private blog where I have an image in the main text that is aligned left, a feature I can choose within the WordPress editor.
Next to the image should be a responsive ad unit, but we only see whitespace. Instead, the ad unit displays below the image and also covers the text that shows there.
When you are managing the ads using a shortcode or the ad block in the content, then the solution is simple. Just don’t add the ad next to an aligned image.
The problem most often surprises users with an automatic content injections set up, because, for understandable reasons, they might not be able to test the injection on every existing or future post and page.
If you are using automatic injections and know the posts and pages the problem appears on then just use the Specific Pages display condition to exclude the ads from such pages.
However, for most automatic content injections, I’d recommend the solution from below.
Use the clearfix option for responsive ads
While there is no solution to prevent responsive ads from jumping below the aligned element (the image in my example), you can prevent it from covering the following text.
Just enable the Clearfix option on the ad edit page.
This option would prevent the ad from covering text, while still being below the image. It is a compromise that works best when this issue is only an exception. The Clearfix option doesn’t cause any problems for responsive ads if there is no aligned element in the text, so you can use it as a precaution.
This option is only visible for AdSense ads that can be responsive. You can find a similar option for other ad types in the Layout / Output meta box on the ad edit screen.
The solution looks like on the screenshot below, where the ad is still below the image, but not covering text anymore.
We talked with AdSense about this, and they confirmed that there is currently no better way of handling this situation. I will update this post if we found one.