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

SlimGeek

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.
Code:
    p img {
        object-fit: contain; width: 100%; height: auto;
    }

Let me know if I may help answer any questions.

Not in email
1677856241920.png


In Email
1677856625825.png

After Pulling HTML/CSS Code from Email
1677858031318.png

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

Attachments

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