user123 user123 - 1 month ago 5
HTML Question

Text goes out from the image

<table align="center" width="300px" cellspacing="0" cellpadding="0" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;background: url(; background-size: 300px 30px; background-position: center; background-repeat: no-repeat; background-color:green;">
<p style="color:#000000; text-align: center; font-weight:100 !important; text-transform: uppercase; font-style: normal; letter-spacing: 1px; font-size: 12px; line-height:30px; font-family: \Montserrat\', sans-serif;">SUNDAY 6TH DECEMBER, 2015</p>

When I see in Gmail , It looks like this.

Image is not showing in proper way

and if I write two dates, then it goes beyond the image.

How can i fix it?


you can put conditions in such case.

like when you have one date then give width according to your need and when you have two dates then give width respectively.

this may solve your issue.