Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a post here:

http://www.food101.co.il/?p=5993

Where the image is overlapping the sidebar. I wish to shrink the image, but I want something that will do this without me editing the post (why? because the author is not me - and I want an automated system)

Is there a plugin or a CSS solution that can do this? (as cross browser as possible?)

share|improve this question

4 Answers 4

up vote 2 down vote accepted

Quick fix via CSS would be using max-width property to style images inside posts. Unfortunately it is very unreliable in Internet Explorer.

.entry img { max-width:500px !important; }

Also in your specific case image has size defined with inline style and it interferes.

Plugin method would involve scanning and changing posts content on the fly, which would probably bring in performance issues, etc.

In my opinion it is better to fix such things consistently on content level. If you have no authority to edit posts show the issue to person who has.

share|improve this answer
    
Thank you Rarst. I used it and it works (at least for chrome). I understand your suggestion but in this particular case this is not applicable. Thanks again! Tal –  Tal Galili Sep 13 '10 at 14:21
    
Hello Rarst - for some reason this doesn't work for me here: food101.co.il/?p=6042 –  Tal Galili Sep 15 '10 at 16:14

You could try adding $GLOBALS['content_width'] = 500; to your theme's functions.php file.

share|improve this answer

Have a look at Ajax Thumbnail Rebuild plugin. Once you re-specify the maximum image width size default under Settings > Media, this plugin will regenerate the thumbnails when the page is loaded.

share|improve this answer
img {max-width:98%; height: auto;}

use this in your stylesheet.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.