WordPress.org

Ready to get started?Download WordPress

Forums

How to make images not stick out (8 posts)

  1. Diam0nd
    Member
    Posted 6 years ago #

    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)?

  2. boober
    Member
    Posted 6 years ago #

    do you have a link to a site actually using that theme?

  3. Diam0nd
    Member
    Posted 6 years ago #

    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.

  4. boober
    Member
    Posted 6 years ago #

    ok, go ahead and have em change it

  5. Diam0nd
    Member
    Posted 6 years ago #

    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? :)

  6. boober
    Member
    Posted 6 years ago #

    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.

  7. BigDonV
    Member
    Posted 6 years ago #

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

  8. boober
    Member
    Posted 6 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic