1

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?

1
  • This is not related specifically to the twentyten theme, I suggest you remove that from the title.
    – hakre
    Commented Aug 24, 2010 at 17:02

4 Answers 4

2

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...

2
  • By creating a child theme ;) That's preserved while the parent theme get's updated. Would this make sense?
    – hakre
    Commented Aug 24, 2010 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
    Commented Aug 24, 2010 at 0:56
2

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.

10
  • Interesting! But I don't know how to do that. Any suggestions ?
    – Tal Galili
    Commented Aug 23, 2010 at 22:37
  • How do you enter those four images into the post?
    – hakre
    Commented Aug 23, 2010 at 22:44
  • I used an HTML table (with a plugin that helped construct it)
    – Tal Galili
    Commented Aug 24, 2010 at 0:57
  • And why does that plugin does not use a width and height attribute for your images? Link to that plug?
    – hakre
    Commented Aug 24, 2010 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
    Commented Aug 24, 2010 at 17:14
0

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.

0
#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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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