title: Using center alignment in HTML for e-mail
body: <p>I started writing html for e-mails using tables. Now, for first time I tried to write using <code>div</code>s, but this is causing a problem: I cannot center align everything I used to be able to center. </p>
  
  <p>Maby what I wrote is not correct, but this is only way that I find, to be able after writing to copy everything from browser to Gmail. </p>
  
  <p>Can someone to tell me how I can center align in this code? </p>
  
  <p>If someone can also tell me if there are better ways to write this code I would be happy to recieve criticism and helpful information.</p>
  
  <p>P.S: I tried padding, positioning, margin, put height and width, but with these options in most results HALF of my bacground or my background is going off at all.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  
   &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
   &lt;title&gt;Untitled Document&lt;/title&gt;
  
   &lt;style type="text/css"&gt;
  div#Container {
  width: 895px;
  height: 525px;
  position: absolute;
  left: 9px;
  top: 15px;
  }
  
  div#Room {
  padding-left: 245px;
  padding-top: 80px;
  width: 625px;
  }
  
  #Room span {
  font-family: Times New Roman, Times, serif;
  font-weight: bold;
  font-size: 23px;
  color: #522405;
  }
  
  #D { padding-left: 70px;
  }
  
  #GD { padding-left: 103px;
  }
  
  #GPV { padding-left: 53px;
  }
  
  div#Content {
  padding-left: 245px;
  padding-top: 10px;
  width: 625px;
  }
  
  #Right {
  position: absolute;
  left: 872px;
  top: 222px;
  }
  
  img.Spacer {
  margin-left: 10px;
  }
  
  div.content {
  font-family: Arial, Helvetica, sans-serif;
  color: black;
  font-size: 17px;
  font-weight: bold;
  }
  
  .BP {
  vertical-align: text-top;
  margin-top: 10px;
  margin-left: 245px;
  }
  
  .table {
  vertical-align: text-top;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  text-align: center;
  color: #002b55;
  margin-left:245px;
  }
  
  .TD {
  margin-left: 30px;
  }
  
  .adress {
      font-family: Times New Roman, Times, serif;
  font-size: 10px;
  text-align: center;
  font-weight: bold;
  color: #100073; 
  }
  
  .OOT {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: #100073;
  text-align:center;
  }
  
  .res {
  vertical-align: top;
  padding-left: 25px;
  }
  
  &lt;/style&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;div&gt;
  
  &lt;img style="position: relative;" src="http://i1300.photobucket.com/albums/ag93/dobriyan/E-mail%20-%20Ayara%20Kamala/BK_zpsa93ab347.png" alt="Background" /&gt;
  
  &lt;/div&gt;
  
  &lt;div id="Container"&gt;
  
  &lt;div id="Room" &gt;
  
      &lt;a href="http://bit.ly/XSyPG5" title="Deluxe" target="_blank" &gt;
  
      &lt;img src="http://i1300.photobucket.com/albums/ag93/dobriyan/E-mail%20-%20Ayara%20Kamala/D_zpsf4ea5de8.jpg" border="0px" alt="Deluxe" /&gt;
  
      &lt;/a&gt;
  
      &lt;a href="http://bit.ly/XSyPG5" title="Grand Deluxe" target="_blank" &gt;
  
      &lt;img class="Spacer" src="http://i1300.photobucket.com/albums/ag93/dobriyan/E-mail%20-%20Ayara%20Kamala/GD_zpse78278b7.jpg" border="0px" alt="Grand Deluxe" /&gt;
  
      &lt;/a&gt;
  
  
      &lt;a href="http://bit.ly/XSyPG5" title="Grand Pool Villa" target="_blank" &gt;
  
      &lt;img class="Spacer" src="http://i1300.photobucket.com/albums/ag93/dobriyan/E-mail%20-%20Ayara%20Kamala/GPV_zpsb381cd33.jpg" border="0px" alt="Grand Pool Villa" /&gt;
  
      &lt;/a&gt;
  
      &lt;br /&gt;
  
      &lt;a href="http://bit.ly/XSyPG5" title="Deluxe" target="_blank" style="text-decoration: none;"&gt;&lt;span id="D"&gt;Deluxe&lt;/span&gt;&lt;/a&gt;
      &lt;a href="http://bit.ly/XSyPG5" title="Grand Deluxe" target="_blank" style="text-decoration: none;"&gt;&lt;span id="GD"&gt;Grand Deluxe&lt;/span&gt;&lt;/a&gt; 
      &lt;a href="http://bit.ly/XSyPG5" title="Grand Pool Villa" target="_blank" style="text-decoration: none;"&gt;&lt;span id="GPV"&gt;Grand Pool Villa&lt;/span&gt;&lt;/a&gt;
    &lt;/div&gt;
  
    &lt;div id="Content" class="content"&gt;Situated on a hill, Ayara Kamala offers a beautiful garden and ocean view rooms. The place of the hotel provides quiet, calm and romantic holiday away from all other hotels on Kamala Beach.
  &lt;br /&gt;
  &lt;br /&gt;
  
  Big size of rooms, king size beds and impressive bathrooms, are making Ayara Kamala            perfect selection for couples who are looking for privacy and relaxing holiday.
   &lt;/div&gt;
  
  &lt;table class="table" style="border-collapse: separate; border-spacing: 1px;" width="625" border="0"&gt;
   &lt;tr&gt;
    &lt;td align="right" style="padding-left: 20px;" width="302"&gt;&lt;a href="http://bit.ly/XSyPG5" title="Book Now !"&gt;&lt;img src="http://i1300.photobucket.com/albums/ag93/dobriyan/E-mail%20-%20Ayara%20Kamala/BP_zps15c948a1.png" border="0px" alt="Best Rate"/&gt;&lt;/a&gt;&lt;/td&gt;
   &lt;td width="321" valign="top"&gt;&lt;table class="TD" style="border-collapse: separate; border-spacing: 0px;" border="0px"&gt;
   &lt;tr&gt;
   &lt;td height="30" class="res" align="center"&gt;&lt;a href="http://bit.ly/XSyPG5" title="B2B Online Booking"&gt;&lt;span&gt;www.b2b.onlyonetour.com&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
   &lt;td class="res" height="30" align="center"&gt;&lt;span&gt;Tel : (66) 02 - 688 - 8883 &lt;/span&gt;      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td class="res" height="30" align="center"&gt;&lt;a href="mailto:rsvn@onlyonetour.com" title="E-mail Reservation"&gt;&lt;span&gt;rsvn@onlyonetour.com&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;/table&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;div align="center" id="Right"&gt;&lt;a style="text-decoration: none;" href="http://bit.ly/XSyPG5" title="Only One Tour &amp;amp; Travel Group Co., Ltd." target="_blank"&gt;&lt;img width="149px" height="90px" src="http://i1300.photobucket.com/albums/ag93/dobriyan/E-mail%20-%20Ayara%20Kamala/logoOOT_zps24c21653.png" border="0px" alt="Logo" /&gt;&lt;/a&gt;
  &lt;a style="text-decoration: none;" href="http://bit.ly/XSyPG5" title="Only One Tour &amp;amp; Travel Group Co., Ltd." target="_blank"&gt;&lt;span class="OOT"&gt;Only One Tour &amp;amp; Travel&lt;br /&gt;Group Co., Ltd.&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
  &lt;a style="text-decoration: none;" href="http://on.fb.me/XXqq56" title="Only One Tour Facebook Page" target="_blank"&gt; &lt;img src="http://i1300.photobucket.com/albums/ag93/dobriyan/E-mail%20-%20Ayara%20Kamala/facebook-logo-png-format-i18_zps83b6a9aa.png" width="145px" height="50px" border="0px" alt="FB"/&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
   &lt;span class="adress"&gt;2128/9-11 Charoenkung Rd.,&lt;/span&gt;&lt;br /&gt;
   &lt;span class="adress"&gt;Watprayakrai, Bangkorleam,&lt;/span&gt;&lt;br /&gt;
   &lt;span class="adress"&gt;10120 Bangkok, Thailand.&lt;/span&gt;&lt;br /&gt;
  &lt;a class="adress"  href="http://bit.ly/XSyPG5" target="_blank"&gt;www.b2b.onlyonetour.com&lt;/a&gt;&lt;br /&gt;
  &lt;a class="adress" href="http://on.fb.me/XXqq56" target="_blank"&gt;www.onlyonetour.com (offline)&lt;/a&gt;
   &lt;/div&gt;
  
  &lt;/div&gt;
  
  &lt;/body&gt; 
  
  &lt;/html&gt;
  </code></pre>