Kubrick resizes images in posts, does not happed with other themes. (5 posts)

  1. red88music
    Posted 7 years ago #


    I have modified the default kubrick theme, and it's looks OK - but has a great feature of resizing images in posts to fit the theme.

    When I load up other themes they work fine, but lack this feature.

    As you can see on my forums:

    Click "Theme #1", "Theme #2" etc to see what I mean.

    Is there any way to incorporate this resize feature into my other themes?

  2. whooami
    Posted 7 years ago #

    its less the "theme" and more the browser. Go look at any of those pages in IE6.

    The point is and I mean this in a nice way -- you're being lazy, and it will bite you in the ass later. If you want an image to display at a certain size with a certain resolution, you resize the image before uploading it.

    You do not, and cannot expect CSS to accommodate you in that manner, especially when dealing with the multitude of browsers that exist. Thats folly.

  3. red88music
    Posted 7 years ago #

    Hmm...I see what you mean.
    No other browsers do it, just IE6 and previous versions *rolls eyes*

    While I will certainly re-size the images manually from now on - what is the css code which does shrink it?
    It would be nice to know, and I might add it to my theme as some of my posters will need me to shrink the images for them, so I can use the css method until I edit their posts.

    Many thanks for taking the time to get back to me :)

  4. Clicknathan
    Posted 7 years ago #

    If you want to use CSS to size an image it's something like:

    img {width:500px; height:500px;}

    That would force every image on your site (not background images, though) to be 500 500px. Of course, if your images aren't squares, then you'll get distortion, so you may not want this to happen. Your theme may be using a CSS property max-width which I believe IE6 and earlier doesn't understand.

    Here's a thread that could help you to figure out how to add a maximum image size to your posts, as this actually seems to be built into WP 2.5: http://wordpress.org/support/topic/164525?replies=13

  5. red88music
    Posted 7 years ago #

    Thanks for the helpful reply clicknathan! :)

    I tried do as suggested in that link, but adding:

    $content_width = 600;
    $GLOBALS['content_width'] = 600;

    to my functions.php file did not work.

    Any clues? Perhaps I should ask in that thread.

Topic Closed

This topic has been closed to new replies.

About this Topic