Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7968921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:09:14+00:00 2026-06-04T07:09:14+00:00

I use a simple email function and it messes all my css.. it puts

  • 0

I use a simple email function and it messes all my css.. it puts all the divs one below another instead of in the wrapper div..
is there a way to overcome it?

 function email_template($app_link, $img_link, $app_name){
       $message='<html>
        <head>

    <title>Purchase Successful!</title>
         </head>
            <body>

      <div id="pic" style="position:relative; text-align:center; margin:0px auto;width:320px; height: 480px;">
       <a href="http://1111111111111edapps.com">  
       <div id="logo" style="position:absolute; width:130px; height:35px; z-index:99999;top:5;">
       </div>
       </a>
        <div id="clickHere" style=" position:absolute;width:320px;height:50px;z-index:99999;top:60px;text-align: center;">
            <span id="clickHereText" style="font-size:140%; color:white;"> <a href="'.$app_link.'" style="color:yellow">Click Here</a> to Download<br/>
                 your phonemate app
                 </span>
        </div>

        <div id="appImg" style="position:absolute;width:50px; height:50px;z-index:99999; left:50px;top:210px;">
            <img src="http://1111111111111edapps.com/'.$img_link.'" width="53px" height="53px"/>
        </div>
        <div id="appLabel" style="position:absolute; width:50px; height:10px; z-index:99999; text-align: center; left:50px; top:260px;">
            <span style="color:white; font-size: 50%;">'.$app_name.'</span>
        </div>

        <div id="downloadLink" style="position:absolute; width:320px; height:30px;  z-index:99999; bottom:0px; text-align: center;">
            <a href="'.$app_link.'" style="color:yellow">Download our app on 1111111111111edApps.com</a>
        </div>
       <img src="http://1111111111111edapps.com/email/images/1111111111111edAppEmail.jpg"/>
    </div>
       </body>
   </html>';

  return $message;


 }

The email function works.. but the divs should be inside ..pic div..but they are outside it.. Is there a way to deliver the email and have it being rendered the same as when i test it on a regular page?

Extra note: my php:

     $to = /*TO EMAIL ADDRESS*/"";
 $subject = "Hi!";
$body=email_template('http://1111111111111edapps.com/app_dl.php?app_id=34', $app_pic, $app_name);
echo $body;
 $headers  = 'MIME-Version: 1.0' . "\r\n";
 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
 if (mail($to, $subject, $body,$headers)) {
   echo("<p>Message successfully sent!</p>");
  } else {
   echo("<p>Message delivery failed...</p>");
  }
  }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:09:15+00:00Added an answer on June 4, 2026 at 7:09 am

    I ran your code through the W3C markup validator, and it seems that you may need to reconsider your approach here:

    <a href="http://1111111111111edapps.com">
    <div id="logo" style="position:absolute; width:130px; height:35px; z-index:99999;top:5;">
    </div>
    </a>
    

    Put an inline element inside the a element (such as a span with display: block; applied). I’d be willing to wager (at this moment in time) that the illegal div is causing you some issues.

    Remember, email clients aren’t designed to handle HTML errors as well as web browsers do, and while support in some clients is very good, others can be quite far behind (I’m looking at you, Outlook 2007+).

    You didn’t mention which email clients you’d tested and which were giving you the problems, so if correcting your markup doesn’t fix it, give us a little more info.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Scenario: I use a simple function to minify and compress JS files during the
Hi I've got a simple question. I've this code below, i use ajax three
How to use simple TCP/IP sockets connections over/with Net.TCP WCF binding? Idea is –
I'm trying to use Simple Savant within my application, to use SimpleDB I currently
We often use simple enumerations to represent a state on our entities. The problem
Is there a way to use simple sql queries on ASP MVC without using
I've always thought it was great that I could use simple iconic unicode characters
use LWP::Simple; use Parallel::ForkManager; @links=( [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3D-2.1-windows.exe,SweetHome3D-2.1-windows.exe], [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3D-2.1-macosx.dmg,SweetHome3D-2.1-macosx.dmg], [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3DViewer-2.1.zip,SweetHome3DViewer-2.1.zip], ); # Max 30 processes for
I want to use the Simple Query tool in SubSonic 3(.0.0.2) and the docs
TCP and UDP(sometimes) use a simple checksum to make sure the contents are correct.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.