Making image fit inside Tumblr Theme Container

2.3k Views Asked by At

I can't seem to find any other Tumblr theme questions like this, so I'm starting a new thread!

My issue is that in my Tumblr theme, is a container theme (or so I believe), but the images in the posts are in fact bleeding through the side of the container. There is use of a max-width:400px snippet of code in the img entry, but it doesn't seem to be working. So this is what's there:

img {
    margin-bottom:0px;
    max-width:400px;
}

.entry img {
     max-width:400px;
     height:auto;
}

I tried doing width:auto; as well for the best fit of the image. But while that makes the image look perfectly matched to its original ratio, it still bleeds out the side of the container.

I have browsed Stackoverflow for a bit, but haven't found any solution that quite matches. I've also tried various adjustments, but they don't seem to be working.

Any help is greatly appreciated! I know this is a question easily solved, but I'm quite new to CSS and would appreciate the help this time!

0

There are 0 best solutions below