Skip to main content

Customizing Width & Height of Adsense Responsive Ad

We all know that AdSense is an advertising program run by the search engine giant Google. It is the worlds largest ads network which works on Pay Per Click system. AdSense displays relevant ads on publishers online contents and help publishers to make money from their online contents. Responsive ads are most popular among publisher whose AdSense accounts are approved by Google AdSense. Read also : How to save web page as PDF file without plugin

Why Responsive ads

Before the responsive ad, Google display standard banner ads on the publishers page which were remains fixed for all kind of devices. But responsive ads are dynamically control the presentation of your website according to the properties of the screen / device that it’s being viewed on. Responsive ads are automatically resized based on the space available. That's why it becomes most popular among publishers which helps them to increase their revenue. Read also : How to track lost/stolen android phone ans secure data.

How to Make Responsive ad Unit

To make responsive ad unit you need to perform the below necessary steps.

Step 1. Log in to your AdSense account.
Step 2. Click My ads and then click New ad unit.
Step 3. Now type ad unit name and then select Responsive from the Ad size.


Step 4. Select ad type.
Step 5. Now click Save and get code.

The default responsive ad code looks like below code and it can automatically adapt its size to the space available on the page.

<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Responsive Ad -->
<ins class="adsbygoogle" data-ad-client="ca-pub-XXXXXXXX" data-ad-format="auto" data-ad-slot="YYYYYY" style="display: block;"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Customizing Responsive ad Unit

You can use the default responsive ad code. But if you wish to customize the width & height of this responsive ad unit according to your requirements then you are free to modify. If you are familiar with the respective adsize of desktop, mobile, tablet then you can easily customize the above responsive AdSense ad unit. Below are the familiar ad size for desktop, mobile, tablet according to their pixel quality. Read also : How to fix HTTP and HTTPS Mixed Content Errors.

1. 300 x 250 ad on mobiles
2. 336 x 280 ad on tablets (minimum width of 500)
3. 728 x 90 ad on desktop (minimum width of 800)
4. 970 x 250 ad on large resolution desktops (minimum width of 1200)

To make the above dimension ad, you need to modify the above responsive AdSense ad unit by adding CSS code with @media query with responsive_ad in the existing responsive AdSense ad unit as follows : Read also : How to remove PDF file password without software.

<style type="text/css">
.responsive_ad { width: 250px; height: 250px; }
@media (min-width: 500px) { .responsive_ad { width: 336px; height: 280px; } }
@media (min-width: 800px) { .responsive_ad { width: 620px; height: 300px; } }
@media (min-width: 1200px) { .responsive_ad { width: 970px; height: 250px; } }
</style>

<ins class="adsbygoogle responsive_ad"
    style="display:inline-block;"
    data-ad-client="ca-pub-XXXXXXXX"
    data-ad-slot="YYYYYY"></ins>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>

You can change responsive_ad with any name. But remember it should be same for all @media quary.

That's it! Feel free to post a comment and share the post on the same. You one share and comment appreciate me lot.



Recommended Post
Big on Hosting. Unlimited Space & Unlimited Bandwidth

Comments

Popular posts from this blog

How To Change Default File Download Path in UC Browser

All of us known that UC browser is the most popular, fast and less data consuming mobile browser for android devices. Many of us use UC browser on daily basis on our smart phones. By default UC browser has download path to internal memory device which is /storage/sdcard0/download. sdcard0 is the built in memory or internal memory of your device. Read also : How to fix HTTP and HTTPS Mixed Content Errors.

Do you know that this default download path can be changed? Since, internal memory is fixed, and once you exceed this value you can't download more. You need to move some data from mobile memory to the external memory which is sdcard1. If you change this default path to external memory card (sdcard1), you can download more data directly to your desired directory. Read also : How to Setup AdSense Page Level Ads and Fix Script Error.

Here, I will show you, how to change this default download path from internal memory card sdcard0 to external memory card sdcard1. To do so you need to…

Calculation of Total Marks, Percentage, Division, Remarks, Maximum & Minimum Number of Students in MS Excel

In this post, I will help you to learn how to calculate total marks, percentage, division, maximum number, minimum number and remarks of students of a class very fast. At first you need to look over the above image very carefully. The above image shows the marks obtained by six students of a class.

Formula to calculate Total Marks of all students within seconds 

First you need to find out the Total Mark of a single student who is on the top of the list i.e, Mani. To calculate Total Mark of Mani, click on the Total Mark cell address of Mani i.e, H6 and then type the formula =sum(1st subject's cell address i.e, b6:last subject's cell address i.e, g6) and then press Enter on the keyboard or click anywhere on the worksheet. Here b6 and g6 are cell address of 1st subject (English) and last subject (Biology) of that student. Read also : How to Enable HTTPS for Blogger Blog.

After getting results, click on the resultant cell address of Total Mark of the 1st student i.e., Mani an…

How To Rename A WhatsApp Group

We all know that WhatsApp is the most popular messaging service for Android, BlackBerry, iPhone and for other platforms. In this post, I will show you how to rename an existing WhatsApp group. To rename an existing WhatsApp group your smartphone must have internet connection. After that you need to follow the below steps. Read also : How to track lost/stolen mobile phone and erase data remotely.


Step 1. Open WhatsApp application on your smartphone.

Step 2. After that you need to click CHATS tab and click on your group name.



Step 3. Once you click on your group name, you will able to see chat details. Now you need to click vertical dots located extremely top right corner and then click Group info. Read also : How to setup AdSense page level ads.


Step 4. Now you can easily rename your group. To rename the group just click Edit icon and then type the desired group name and click OK. Read also : How to protect your computer from WannaCry ransomware virus.


In this way you can rename a What…

Change UC Browser Default Homepage in Android Phones

We all know that Android OS operated Smartphones and Tablets are great for web browsing. Like other browsers, uc browser has a default search engine Yahoo is set for web search. UC browser provides different kind of search facilities under 5 different categories namely Web, Video, Shop, Image and APP. Read also : How to protect your computer from WannaCry ransomware virus.

In this post, I will show you how to change the default search engines of uc browser in Android devices for their 5 different categories. To do so you just need to follow the below steps. Read also : How to Enable HTTPS for Blogger Blog.

Change Default Homepage for UC Web search

Step 1. At first you need to open UC browser
Step 2. After that click Search. Follow the below image.


Step 3. Once you click Search, you will able to see the default search engine's icon for Web search like y for Yahoo, g for Google. Now you need to click that search icon. Follow the below image. Read also : How to change UC browser defaul…

Enable Auto Save Forms & Passwords in UC Browser

Many of you use UC browser on daily basis on your smart phone but very less enable this feature. Enabling auto save forms and passwords allows the browser to remember the username and passwords. It gives you relief from entering username & password every time whenever you login to your email. Did you enable auto saving form & password? If not, then do it now. Read also : How to track lost/stolen mobile phone and erase data remotely.

In this post, I will show you how to enable auto save forms & password in UC browser in your Android phones. To do so you need to follow the below steps.

Steps to enable auto save forms and passwords

Step 1. At first open UC browser

Step 2. In the second step, tap on the horizontal bar.


On the next image, you will able to see Bookmarks, History, Refresh etc. icons. Now swipe this menu screen to the left and tap Settings. Read also : How to create custom AdSense Search Engine and make money from it.


Step 3.  Now on the Browser Settings, you w…

Change SMS Storage Location in Android Device

By default all the SMS that you have got from friends and mobile operators are stored in either SIM card or phone memory. There is a limited space in the SIM card to store your SMS. If the limitation exceeds all SMS you have got is start storing in phone memory. In this post I will discuss how to change default SMS storage location from Phone memory to SIM card in Android devices. To change the SMS storage location, you just need to perform the below steps.

Step 1. At first you need to open the Messaging application from the app screen. After that, you need to touch the Menu icon i.e., the three vertical dots of top right corner and then need to touch Settings.


Step 2. SMS Settings screen opens. Here, you need to touch Text Message(SMS).


Step 3. Now you need to touch SMS Storage Location. If you use dual SIM card on your Android device then you just need to select the desired mobile operator for which you want to change the SMS storage location either from Phone memory to SIM or SIM …

Best Video Calling App For 2G, 3G, 4G and Wi-Fi Network

More or less every mobile subscriber wishes to chat with their contacts by seeing his/her infront of them. Now a days video calling becomes more popular in urban areas rather than rural areas. After the invention of 3G network it becomes a trend to chat with loved one through video calling. Read also : How to protect your computer from WannaCry ransomware virus.

But what happened if you have 2G network instead of 3G or 4G. Could you be able to chat with your loved one by seeing him on 2G network? There is a good news for those who wishes to see their friends or family members on mobile screen when they talk to them. There are many application software available on internet which provides video calling facility even on 2G network. Read also : How to Setup AdSense Page Level Ads and Fix Script Error.

Although there are many video calling applications are available, among them my recommendation is IMO. Because IMO provides fast, free and high quality video calling facility to its members…