title: get checkbox text on same line as control using asp:CheckBox control
body: <p>I have found numerous references to this but still cannot get it to work.
  Several people have pointed to a previous post from 7 years ago that has a similar sounding problem but as detailed below the solution for that does not work at all.</p>
  
  <p>I have the following asp code:</p>
  
  <pre><code>&lt;asp:CheckBox id="checkbox1" runat="server" Style="display:inline;"
       AutoPostBack="True" Text="Send Emails" TextAlign="Right"/&gt;
  </code></pre>
  
  <p>It displays like this:</p>
  
  <p><a href="https://i.stack.imgur.com/uu88W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uu88W.png" alt="bad display"></a></p>
  
  <p>If I go into the elements explorer in Chrome I see the following:</p>
  
  <p><a href="https://i.stack.imgur.com/bmXkS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bmXkS.png" alt="enter image description here"></a></p>
  
  <p>If I manually add the style attribute to the input line like this (using the Chrome Elements right click menu), it works:</p>
  
  <p><a href="https://i.stack.imgur.com/k2Z2E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k2Z2E.png" alt="enter image description here"></a></p>
  
  <p>What am I doing wrong and how can I fix this?</p>
  
  <p>Update:  This is the "solution" I wound up doing:</p>
  
  <pre><code> &lt;div &gt;
     &lt;input id="checkbox1" type="checkbox" name="checkbox1"  style="display: inline"/&gt;
     &lt;label for="checkbox1"&gt;I would like to receive periodic email&lt;/label&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>While this works it is obviously just avoiding the question entirely by switching to a HTML control vs ASP.</p>