Ross
Ross

Reputation: 27

Simple HTML email not so simple

Im trying to make a html email that has a jpg in the background and a jpg over it, the one on top is a link, however I can only get the top pic to appear in my main and its position is not where I want it, here is the code and it works perfectly as a normal html page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <!-- InstanceBegin template="/Templates/cmcb.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title>Chamerlain McBain</title>
    <div class="wholepage">
        <div class="header">
            <div class="logo" style="width: 990px; height: 990px">
                <div class="headerimages">
                    <div style="position:absolute;  top:0px; style=" width:
                    28px; height: 28px;">
                    <img src="http://www.mockcourt.org.uk/CMCB%20Campaign%20Aug12.jpg" width="990" height="990"/></a>
                </div>
                <div class="headerimages">
                    <div style="position:absolute; left:142px; top:564px; style=" width:
                    28px; height: 28px;">
                    <a href="http://www.mockcourt.org.uk">
                        <img src="http://www.mockcourt.org.uk/here.jpg" width="88" height="50"/></a>
                </div>
                </body>

Upvotes: 1

Views: 126

Answers (2)

Stuart
Stuart

Reputation: 1151

HTML Email is very different from Web HTML, and event then various clients - Outlook, Notes, Hotmail - all handle it a bit diferently.

here are some resources to help you design your email properly.

Upvotes: 1

Curtis
Curtis

Reputation: 103368

When it comes to HTML emails, as much as I hate to say it, table layouts are your friends.

Tables are rendered a lot more consistently across email clients than CSS styles are, and therefore I would recommend using these if you wish to support the majority of clients.

As some comments have also pointed out, I would suggest cleaning up your HTML so that it is valid. This will also help with email clients being able to understand your code.

Upvotes: 3

Related Questions