HTML mail design - Writing text above image

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phpmagesh
    New Member
    • Nov 2008
    • 119

    HTML mail design - Writing text above image

    Hi all,

    I am designing a HTML mail template which will have images as well as text in it.

    i am trying to have a image in the background and want to write dynamic text above that. say name of the viewer who view the mail.

    I found that CSS will not support any more for mail templates. this will be a problem always.

    Is there any way to show a dynamic text by keeping the background image in back end. this should support all mail servers like (gmail, yahoo, outlook etc.,)

    Thanks much!

    Magesh
  • JKing
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    No. No matter what you do some mail clients just don't support background images. The best thing to do is set a background color along with the image.

    Comment

    • phpmagesh
      New Member
      • Nov 2008
      • 119

      #3
      Thanks King! i did as you said,

      however, Is there any way to write the dynamic text above image. i placed the image using <img> in <td>.

      Comment

      • JKing
        Recognized Expert Top Contributor
        • Jun 2007
        • 1206

        #4
        No, you would have to make the image a background image.
        Code:
        <td style="background-image:url(http://www.example.com/images/background.jpg');background-color:#ffffff;">
        Dynamic text here.
        </td>
        Here's a resource that you may find helpful, it is a guide to css support for major email clients. CSS Support Guide

        Comment

        • phpmagesh
          New Member
          • Nov 2008
          • 119

          #5
          background-image:url is not working as we expected. i google many solutions, which says css will not support in html mail.

          i tried with the above method but image is not loading. i can see the text in that place

          Comment

          • JKing
            Recognized Expert Top Contributor
            • Jun 2007
            • 1206

            #6
            Any CSS has to be inline. As I have said before background-image is only supported by some email clients so therefore you have to also include a background color for those that do not support images.

            My previous example was only an example you would need to replace the URL with your own.

            Comment

            Working...