title: How to align image to right using JavaScript?
body: <p>hi i am trying to right align "Donate" button that is created by JS as shown in code below,</p>
  
  <pre><code>&lt;%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MentorMentee.master.cs" Inherits="MentorMentee.MentorMentee" %&gt;
  
  &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 runat="server"&gt;
      &lt;title&gt;Untitled Page&lt;/title&gt;
      &lt;link href="style/style.css" rel="stylesheet" type="text/css" /&gt;
      &lt;asp:ContentPlaceHolder ID="head" runat="server"&gt; 
  
      &lt;/asp:ContentPlaceHolder&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server" action="https://www.paypal.com/cgi-bin/webscr" method="post"&gt;
      &lt;div id="main"&gt;
      &lt;header&gt;
        &lt;div id="logo"&gt;
          &lt;div id="logo_text"&gt;
            &lt;!-- class="logo_colour", allows you to change the colour of the text --&gt;
              &lt;h1&gt;&lt;span&gt;M&lt;/span&gt;&lt;/h1&gt;  
              &lt;script type="text/javascript"&gt;
      function Donate()
  {
      var myform = document.createElement("form");
      myform.action = "https://www.paypal.com/cgi-bin/webscr";
      myform.method = "post";
      myform.target = "_blank";
  
      var image = document.createElement("input");
      image.type = "image";
      image.src = "https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif";
      image.border = "0";
      image.name = "submit";
      image.alt="PayPal - The safer, easier way to pay online!";
  
      //Most probably this can be skipped, but I left it in here since it was present in the generated code
      var pixel = document.createElement("image");
      pixel.border = "0";
      pixel.alt="";
      pixel.src = "https://www.paypalobjects.com/en_US/i/scr/pixel.gif";
      pixel.width = "1";
      pixel.height = "1";
  
  
      myform.appendChild(image);
  
  
      myform.submit();
  }
      &lt;/script&gt;        
        &lt;/div&gt;
        &lt;nav&gt;
          &lt;asp:ContentPlaceHolder ID="HeaderContent" runat="server"&gt;
  
          &lt;/asp:ContentPlaceHolder&gt;
          &lt;/nav&gt;
          &lt;/div&gt;
          &lt;/header&gt;
          &lt;div id="site_content"&gt;
          &lt;div class="content"&gt;
                  &lt;asp:ContentPlaceHolder ID="MainContent" runat="server"&gt;
                  &lt;/asp:ContentPlaceHolder&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif"
  border="0"
  alt="PayPal - The safer, easier way to pay online!"
  onclick="javascript:Donate();"
  style="cursor:pointer;"/&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But i am willing to place it in the same row where i am doing this,</p>
  
  <pre><code>&lt;h1&gt;&lt;span&gt;M&lt;/span&gt;&lt;/h1&gt;
  </code></pre>