How to hide "Advertisement" div tag for Mobile devices?


#1

Hi,

I am using this code for Adsense ad code and its working perfectly but i want to hide “advertisement” dive tag for Mobile devices. Please tell me how can i do this ?

/----------Sponsor Label by Blogger Help Forum----------/

.Ad-label { display: none; }

@media screen and (min-width: 768px) { .Ad-label { clear: both; display: block; float: left; margin: 10px auto 5px 20px; width: 28%; } } .Ad-label{ color: #444; background: #00FFFFFF; font-family: arial; padding: 3px 10px; font-size: 0px; -webkit-transform: rotate(90deg); -webkit-transform-origin: left top; -moz-transform: rotate(90deg); -moz-transform-origin: left top; -ms-transform: rotate(90deg); -ms-transform-origin: left top; -o-transform: rotate(90deg); -o-transform-origin: left top; transform: rotate(90deg); transform-origin: left top;
position: absolute;
left: 1%;
top:0px; white-space: nowrap;
font-size: 11px; display: inline-block;}

Advertisement
var td_screen_width = document.body.clientWidth;
                if ( td_screen_width >= 1200 ) {
                    /* large monitors */
                    document.write('<ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-114652041234****" data-ad-slot="648530*****"></ins>');
                    (adsbygoogle = window.adsbygoogle || []).push({});
                }
        
                if ( td_screen_width >= 1019  && td_screen_width < 1200 ) {
                    /* landscape tablets */
                    document.write('<ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-1146520412341*****" data-ad-slot="648530*****"></ins>');
                    (adsbygoogle = window.adsbygoogle || []).push({});
                }
            
                if ( td_screen_width >= 768  && td_screen_width < 1019 ) {
                    /* portrait tablets */
                    document.write('<ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-114652041234*****" data-ad-slot="648530*****"></ins>');
                    (adsbygoogle = window.adsbygoogle || []).push({});
                }
         
                if ( td_screen_width < 768 ) {
                    /* Phones */
                    document.write('<ins class="adsbygoogle" style="display:inline-block;width:320px;height:100px" data-ad-client="ca-pub-114652041234*****" data-ad-slot="6485309*****"></ins>');
                    (adsbygoogle = window.adsbygoogle || []).push({});
                }
            </script></div></code>

#2

Code invisible ?

[ 40 charactrr left only]


#3

Use code here to put your code here.

Screenshot:


#4

Still not working…

[40 characters left]


#5

Use mobile conditional tag to hide content or widget on blogger mobile view,

<b:if cond='data:blog.isMobileRequest == "false"'>

your contents

</b:if>

for more info, click here http://www.mybloggertricks.com/2015/07/Blogger-Mobile-Conditional-Expressions.html