Resource icon

Add advertising centered and only show on pc or only show on mobile

Kent D

Active member
doanhoangnamvn submitted a new resource:

Add advertising centered and only show on pc or only show on mobile - advertising centered and only show on pc or only show on mobile

Add these code to extra.less template

CSS:
@media all and (min-width: 480px) {
    .deskContent {
            display:block;
            margin: 0 
            auto;
    }
    
     
    .phoneContent {display:none;}
    
}

@media all and (max-width: 479px) {
    .deskContent {display:none;}
    .phoneContent {display:block;
     margin: 0 auto;}
}
.aads {
    display:block;
    margin: 0 auto;}
go to admin/setup/advertising and choose your right advertising position and add...
Read more about this resource...
 

woody

Active member
Has anyone tested this in practice? It doesn't work on my 2.1 forum, ads appear on both desktop and mobile.
 
Top