views:

13

answers:

0

I have composed a simple mail message with ActionMailer

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Welcome mail</title>
    <style type="text/css" media="screen">
        img {
            display: block;
            position: absolute;
            left: 0px;
            top: 0px;
            min-width: 800px;
            min-height: 600px;
            width: 800px;
            height: 600px;
        }
        div {
            position: absolute;
            text-align: center
        }
        #header {
            left: 135px;
            top: 55px;
            width: 460px;
            font-size: 20px;
        }
        #greeting {
            left: 175px;
            top: 110px;
            width: 380px;
            color: #006600;
            font-size: 16px;
        }
    </style>
</head>
<body>
    <%= image_tag "back-objects.png" %>
    <div id="header">Welcome</div>
    <div id="greeting">My greeting</div>
</body>
</html>

I've used "inline_attachment" gem, to make showing images in mail possible.

This message contains an image, that will be shown to a user. Text will be over it, so we get a nice composition.

The problem is - i cannot make the image no-resizable. As i shrink the window of Mail.app, the image will be down scaled too.

I tried to wrap this image into a holder div, but no success.

How it can be done ?