What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

Contain Img Within Table - Used in email


New member
Hey folks,

I am having trouble with something super simple. Maybe I am just overlooking it, but can someone PLEASE help with the below...?

I am having an issue with a large img expanding my table, when I want the table to stay contained within. This is for an email template. If you view the HTML not through email, it contains it and does not distort the image. However, whenever the email is recieved, the image is still contained, but stretches the whole table. See image references below. HTML/CSS code is attached.

This is the string of code I am using to attempt to contain the img.
    p img {
        object-fit: contain; width: 100%; height: auto;

Let me know if I may help answer any questions.

Not in email

In Email

After Pulling HTML/CSS Code from Email

Thank you for any help you can provide!!!!


  • Code + Image.zip
    24 KB · Views: 0