Question

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"

Was it helpful?

Solution

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

   $($('ins').first()).css({
        ...
   })
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top