Adsense Widget is using responsive CSS classes for sizing. If you have ever used bootstrap before, you will feel familiar with this. View demo placeholders using the link below:

View Sizing Demo

Here is a shortcode with most popular in-post sizing options:

[adsense userid="pub-xoxox" format="display" align="none" slot="xxx" sizes="sm-banner md-rectangle lg-leaderboard"]

This shortcode shows mobile banner on mobile phones, rectangle ads on medium and leaderboard ads on desktop. If you want to show rectangle on all sizes:

[adsense userid="pub-xoxox" format="display" align="none" slot="xxx" sizes="sm-rectangle md-rectangle lg-rectangle"]

How Does Adsense Sizing Work?

Sizing uses prefixes for different screen dimensions:

  • sm-: Mobile devices
  • md-: Tablets
  • lg-: Desktop & Laptops

Depending on device screen size, your ad size changes using the CSS width and height attributes.

Adsense Widget Sizing Options

Mobile Tablet Desktop
sm-rectangle 336×280 336×280 336×280
md-rectangle 336×280 336×280 336×280
lg-rectangle 336×280 336×280 336×280
sm-banner 320×100
md-banner 468×60
lg-banner 468×60
md-leaderboard 728×90
lg-leaderboard 728×90
lg-billboard 970×250