CSS BACKGROUND-IMAGE PROPERTY NOT WORKING IN MS OUTLOOK

Tanuj Kumar

Total Post:134

Points:940
Posted by  Tanuj Kumar
HTML5 
 2386  View(s)
Ratings:
Rate this:
Hi,
Actually I've used td background-image property in table but it is not working in outlook. So let me whether any other option to set background-image of td which will comfortable with outlook. If possible, please paste the code.

Thanks in advance!
  1. Arun Singh

    Post:68

    Points:476
    Re: CSS background-image property not working in MS Outlook

    Hi Tanuj Kumar,

    Microsoft Outlook does not support css background-image property due to security point of view. To use background-image property in your html code you have to use VML code like as follows:

    //----------------------------------------------------------Start VMLCode-------------------------------------------------------------//

    <td>

    <!--[if gte mso 9]>

    <v:image xmlns:v="urn:schemas-microsoft-com:vml" id="theImageTop" style='behavior: url(#default#VML); display:inline-block; position:absolute; height:131px; width:813px; top:0; left:0; right:0; bottom:0; border:0; z-index:1;' src="http://www.mindstick.com/newsletter/headerimg.png"/>

    <v:shape xmlns:v="urn:schemas-microsoft-com:vml" id="theTextTop" style='behavior: url(#default#VML); position:absolute; display:inline-block; height:131px; width:700px; border:0; z-index:2;'>

    <![endif]-->

    <p> Your text here which you want to show on backgroung image. You can use here html tag too</p>

    <!--[if gte mso 9]>

    </v:shape>

    <![endif]-->

    </td>

    //-------------------------------------------------------------End VML Code-----------------------------------------------------------//

    For more details on this topic you can check this link:

    http://mindstick.com/Blog/325/CSS%20background%20image%20property%20not%20working%20in%20Outlook

    I hope it might be resolve your problem.

     

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!