WordPress.org

Support

Support » Themes and Templates » How to make images not stick out

How to make images not stick out

  • In the Unsleepable theme ( http://openswitch.org/downloads/ ) if I post a huge image, the theme somehow makes it not stick out and take more space than it’s column. A lot of other themes don’t do that. Is there a code I could add to another theme to make it do the same thing (not allow bigger images to stick out)?

Viewing 7 replies - 1 through 7 (of 7 total)
  • do you have a link to a site actually using that theme?

    Here’s a test site running a theme that does DOES allow images to stick out: http://wordpress.petrabbitlife.com/

    When you have had a look at it, reply here. I’ll ask the owner to change it to the Unsleepable theme, and that same image will NOT be sticking out.

    ok, go ahead and have em change it

    Done. As you can see, same test blog, same picture, but for some reason it does NOT stick out. This is such a cool feature that I would like to somehow add to another theme. Any chance you know what’s it called or how to add it? 🙂

    thats in your stylesheet, these two sections

    #primary .entry-content img {
    	margin-left: 0px;
    	padding: 4px;
    	border: 0px solid #ccc;
    	max-width: 100%;
    	}
    #primary .entry-content2 img {
    	margin-left: 0px;
    	padding: 4px;
    	border: 0px solid #ccc;
    	max-width: 100%;
    	}

    the max-width: 100%; keeps them from overflowing.

    Does that work in IE or do you need to use a DOM style for this in IE?

    as far as i can see through netrenderer it does NOT work in IE6 and below

    its always better to just post your images in the correct size anyways. smaller file size.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to make images not stick out’ is closed to new replies.