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.

In this post:

http://humus101.com/?p=1734

We've got 4 images set (in the img property) to a width of 246 pixel.

In chrome it looks fine. In IE6 it doesn't.

Any suggestions on how to solve this?

share|improve this question
    
This is not related specifically to the twentyten theme, I suggest you remove that from the title. –  hakre Aug 24 '10 at 17:02
    
Hakre - thanks for the suggestion - Done. –  Tal Galili Aug 24 '10 at 17:15

4 Answers 4

up vote 2 down vote accepted

I solved the problem.

In the style.css

I needed to make the following change

#content img {
    margin: 0;
    height: auto;
    max-width: 640px;
    /*width: auto;*/
}

I now wonder how to make that stay for all the following theme updates...

share|improve this answer
    
By creating a child theme ;) That's preserved while the parent theme get's updated. Would this make sense? –  hakre Aug 24 '10 at 0:11
1  
It makes sense. I tried doing it - but failed somehow. I'll play with it more, and if fail again - will return to ask :) –  Tal Galili Aug 24 '10 at 0:56

The height attribute of the image is missing. So I would not wonder about differences in display between browsers, because HTML 4 specs do not clearly define how to deal with such a situation.

How to deal with that? Hook into the theme / wp core and patch the code that next to the width attribute, the height attribute is calculated and used as well.

share|improve this answer
    
Interesting! But I don't know how to do that. Any suggestions ? –  Tal Galili Aug 23 '10 at 22:37
    
How do you enter those four images into the post? –  hakre Aug 23 '10 at 22:44
    
I used an HTML table (with a plugin that helped construct it) –  Tal Galili Aug 24 '10 at 0:57
    
And why does that plugin does not use a width and height attribute for your images? Link to that plug? –  hakre Aug 24 '10 at 14:11
    
Sorry, I wasn't clear. I am using the default image unloader to get the images. I am simply organizing them inside a table to have a square layout. –  Tal Galili Aug 24 '10 at 17:14

If 640 px is the width you want. I would go into wordpress and set that up as one of the sizes for the images; and then when you want to insert one into a post, select the that size.

Under Settings->Media you can set the Medium and Large sizes. I would change these to what you want; then use this plugin http://wordpress.org/extend/plugins/bulk-image-resize-utility/ which will resize the images you have.

What wordpress will do is create new images with these dimensions. What this does for the user, is they are only downloading the size of the image that the are seeing, which helps page load time.

You might have to go back into your post and edit the images to use the medium or large size.

share|improve this answer
#content img {
    margin: 0;
    height: auto;
    max-width: 640px;
    width: auto;
}

The above puzzles me terrible, I did remove width: auto; in TwentyTen theme, it worked - but as for the child tbeme option, how does one leave out the line in child theme, but is still used via parent theme, its weird!

I though the child theme style sheet replace use of TwentyTen theme.

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.