Viewing 2 replies - 16 through 17 (of 17 total)
  • Try adding the display property to the css:

    #adbox {
      height: 100px;
      width: 320px;
      border: 1px solid gray;
      margin: 20px auto;
      display: table;
      }

    Thank you for the code. I modified it a bit so that it will adjust for mobile version. The ads are being cut when viewed in small devices. So I place 2 ads, one is 730×90 and the other one is 256×80. For big screens the 256×80 is hidden.
    Here is my site
    denricdenise.info

    Here is the code

    <!-- BEGIN Ad Box -->
    <div id="adbox" style="float:right;padding-top:20px;">
    	<!-- your 730x90 ads -->
    </div>
    <div id="adbox-small" style="display: none; text-align: center;">
    	<!-- your 256x80 ads -->
    </div>
    <!-- END Ad Box -->

    CSS

    @media (max-width: 600px)
    {
    	#adbox {
    		 display:none;
    	}
    
    	#adbox-small {
    		display:inline !important;
    	}
    	#adbox-small img {
    		display:block;margin:auto;
    	}
    
    	#header .pad {
    		padding:1px !important;
    	}
    }

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Add Google Adsense to My Header’ is closed to new replies.