문제

I'm supposed to make a PC site readable on mobile devices. I'm using Jquery Mobile CSS, which works quite ok.

The problem: the current site uses some Google 728x90px banners, which break my mobile layout.

Question
Is there any way to Jquery-set their width to 100%?

I can add borders using this Jquery (although the banner loads first, so this already breaks my layout), but I can't set the width like this.

$('.widget-content ins, .widget-content img').css({ 'border':'5px solid red', 'width':'22px !important'});

Can this be done any better? Would I want to do this?

What would be a workaround if a site uses Jquery-Mobile to display across all devices (PC&mobile) and the ads are just configured for desktop?

Thanks for some inputs and hopefully an easy Jquery "patch"

도움이 되었습니까?

해결책

I use this to edit the ins of the google ad:

   $($('ins').first()).css({
        ...
   })
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top