Take the 2-minute tour ×

I would like to overwrite all images width to 90% percent. But there are some pictures have the styles in css file, some looks like this:

 <img src="sss" style="something" ... 

I vanna dell all style things in the mobile version of website.

This is it: http://mikrobusz-berles.com The pictures are too big. I wanna resize them for mobile version. Any idea?

share|improve this question
What have you tried? –  dbf Dec 28 '12 at 12:45

4 Answers 4

up vote 0 down vote accepted

If you just wanna change the width to 90% if a user is using a mobile phone you can do something like this.

write a CSS class as follows:

.mobile-image {
    width: 90% !important;

Now use jquery to know if a user is using a mobile phone and then use the addClass() method as follows to add the above css class to all the images.

    // Check if a user is logged in using a Mobile Phone or a Handheld Device.
    if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
        // To adjust the width
        // To Remove style attribute
        $('img').attr('style') = '';
share|improve this answer

you could use an output buffer (read on the manual) it would capture the whole page with


 //Content here

And use some regex on $contents to overwrite the width and them echo the $contents

share|improve this answer

Add this to your css file:

.jFlowSlideContainer img{
share|improve this answer

You can override the styles again using jquery. Code:


This code is for jquery mobile which you're using.

share|improve this answer

Your Answer


