twitter bootstrap - How to make responsive Google-adsense ads scale on resize? -
i using google adsense responsive ads (with bootstrap) , works on page load. in hand-held device detects orientation , adjusts ads immediatly.
however, when resize browser not react it. weird claim responsiveness when there no build in system detect screen resize. have thought add eventlistener, work around or break? thought of loading in different ad sizes few break point avoid , use "responsive" ad.
thanks in advance suggestions.
first, assign height , width of div want ad fit in, using either percents or px (percents scalable).
then, using css create media queries have height , width change of ad div based on height , width of screen viewing.
next, add .addiv iframe { max-width:100% !important; max- height:100% !important;}
css. tells browser render ad (assuming it's iframe) full scale of div , !important
overrides css set ad or plugins.
hope helped!
Comments
Post a Comment